Skip to content

github.com/butuzov/ireturn@v0.2.1: checksum mismatch #4175

@rkosegi

Description

@rkosegi

Welcome

Description of the problem

After I upgraded from v1.54.2 to v1.55.1 using pre-commit autoupdate, I can no longer use this check.
During commit, following error is shown:

git commit -s
[INFO] Installing environment for https://github.com/golangci/golangci-lint.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/usr/bin/go', 'install', './...')
return code: 1
expected return code: 0
stdout: (none)
stderr:
    go: downloading golang.org/x/tools v0.14.0
    go: downloading github.com/hashicorp/go-version v1.6.0
    go: downloading github.com/mitchellh/go-homedir v1.1.0
    go: downloading github.com/spf13/viper v1.12.0
    go: downloading github.com/mitchellh/mapstructure v1.5.0
    go: downloading github.com/ldez/gomoddirectives v0.2.3
    go: downloading golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea
    go: downloading gopkg.in/yaml.v3 v3.0.1
    go: downloading github.com/fatih/color v1.15.0
    go: downloading github.com/gofrs/flock v0.8.1
    go: downloading github.com/spf13/cobra v1.7.0
    go: downloading github.com/spf13/pflag v1.0.5
    go: downloading github.com/hashicorp/go-multierror v1.1.1
    go: downloading github.com/mattn/go-colorable v0.1.13
    go: downloading github.com/sirupsen/logrus v1.9.3
    go: downloading github.com/stretchr/testify v1.8.4
    go: downloading github.com/go-xmlfmt/xmlfmt v1.1.2
    go: downloading github.com/golangci/revgrep v0.5.2
    go: downloading 4d63.com/gocheckcompilerdirectives v1.2.1
    go: downloading 4d63.com/gochecknoglobals v0.2.1
    go: downloading github.com/4meepo/tagalign v1.3.3
    go: downloading github.com/Abirdcfly/dupword v0.0.13
    go: downloading github.com/Antonboom/errname v0.1.12
    go: downloading github.com/Antonboom/nilnil v0.1.7
    go: downloading github.com/Antonboom/testifylint v0.2.3
    go: downloading github.com/BurntSushi/toml v1.3.2
    go: downloading github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24
    go: downloading github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0
    go: downloading github.com/OpenPeeDeeP/depguard/v2 v2.1.0
    go: downloading github.com/alecthomas/go-check-sumtype v0.1.3
    go: downloading github.com/alexkohler/nakedret/v2 v2.0.2
    go: downloading github.com/alexkohler/prealloc v1.0.0
    go: downloading github.com/alingse/asasalint v0.0.11
    go: downloading github.com/ashanbrown/forbidigo v1.6.0
    go: downloading github.com/ashanbrown/makezero v1.1.1
    go: downloading github.com/bkielbasa/cyclop v1.2.1
    go: downloading github.com/blizzy78/varnamelen v0.8.0
    go: downloading github.com/bombsimon/wsl/v3 v3.4.0
    go: downloading github.com/breml/bidichk v0.2.7
    go: downloading github.com/breml/errchkjson v0.3.6
    go: downloading github.com/butuzov/ireturn v0.2.1
    go: downloading github.com/butuzov/mirror v1.1.0
    go: downloading github.com/catenacyber/perfsprint v0.2.0
    go: downloading github.com/charithe/durationcheck v0.0.10
    go: downloading github.com/curioswitch/go-reassign v0.2.0
    go: downloading github.com/daixiang0/gci v0.11.2
    verifying github.com/butuzov/ireturn@v0.2.1: checksum mismatch
    	downloaded: h1:QXLHriOCzRI8VN9JPhfDcaaxg3TMFD46n1Pq6Wf5zEw=
    	go.sum:     h1:w5Ks4tnfeFDZskGJ2x1GAkx5gaQV+kdU3NKNr3NEBzY=
    
    SECURITY ERROR
    This download does NOT match an earlier download recorded in go.sum.
    The bits may have been replaced on the origin server, or an attacker may
    have intercepted the download attempt.
    
    For more information, see 'go help module-auth'.
    
Check the log at /home/<myuser>/.cache/pre-commit/pre-commit.log

Version of golangci-lint

$ golangci-lint --version
golangci-lint has version v1.55.1 built with go1.20.8 from (unknown, mod sum: "h1:DL2j9Eeapg1N3WEkKnQFX5L40SYtjZZJjGVdyEgNrDc=") on (unknown)

Configuration

cat .pre-commit-config.yaml
---
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.5.0
    hooks:
      - id: trailing-whitespace
      - id: check-yaml
      - id: check-merge-conflict
  - repo: https://github.com/golangci/golangci-lint
    rev: v1.55.1
    hooks:
      - id: golangci-lint
  - repo: https://github.com/dnephin/pre-commit-golang
    rev: v0.5.1
    hooks:
      - id: go-mod-tidy
      - id: go-fmt

Go environment

$ go version && go env
go version go1.20.8 linux/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN="/home/<myuser>/go/bin"
GOCACHE="/home/<myuser>/.cache/go-build"
GOENV="/home/<myuser>/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/<myuser>/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/<myuser>/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/lib/golang"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.8"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/<myuser>/git/ezz/public/netflow-collector/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1931778295=/tmp/go-build -gno-record-gcc-switches"

Verbose output of running

$ golangci-lint cache clean
$ golangci-lint run -v
INFO [config_reader] Config search paths: [./ /home/<myuser>/git/ezz/public/netflow-collector /home/<myuser>/git/ezz/public /home/<myuser>/git/ezz /home/<myuser>/git /home/rkosegi /home /] 
INFO [config_reader] Used config file .golangci.yaml 
INFO [lintersdb] Active 1 linters: [staticcheck]  
INFO [loader] Go packages loading at mode 575 (deps|imports|types_sizes|compiled_files|files|name|exports_file) took 162.081293ms 
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 2.184149ms 
INFO [linters_context/goanalysis] analyzers took 11.188151385s with top 10 stages: buildir: 10.086616335s, fact_deprecated: 350.881816ms, nilness: 227.785961ms, fact_purity: 214.011804ms, SA5012: 153.700839ms, typedness: 108.611139ms, SA4030: 2.451012ms, SA4025: 2.293957ms, SA1012: 2.053847ms, SA1004: 1.699748ms 
INFO [runner] processing took 2.837µs with stages: max_same_issues: 440ns, skip_dirs: 331ns, nolint: 310ns, identifier_marker: 165ns, cgo: 149ns, skip_files: 137ns, fixer: 131ns, path_prettifier: 131ns, autogenerated_exclude: 129ns, exclude-rules: 128ns, filename_unadjuster: 126ns, source_code: 122ns, max_from_linter: 104ns, path_shortener: 72ns, sort_results: 54ns, exclude: 54ns, diff: 53ns, severity-rules: 52ns, path_prefixer: 51ns, max_per_file_from_linter: 50ns, uniq_by_line: 48ns 
INFO [runner] linters took 3.717645216s with stages: goanalysis_metalinter: 3.71760539s 
INFO File cache stats: 0 entries of total size 0B 
INFO Memory: 40 samples, avg is 265.8MB, max is 370.0MB 
INFO Execution took 3.889130369s        

A minimal reproducible example or link to a public repository

// add your code here

I just run pre-commit autoupdate on main branch in this repo https://github.com/rkosegi/netflow-collector

Validation

  • Yes, I've included all information above (version, config, etc.).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdependenciesRelates to an upstream dependency

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions