-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
bugSomething isn't workingSomething isn't workingdependenciesRelates to an upstream dependencyRelates to an upstream dependency
Description
Welcome
- Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
- Yes, I've searched similar issues on GitHub and didn't find any.
- Yes, I've read the typecheck section of the FAQ (https://golangci-lint.run/usage/faq/#why-do-you-have-typecheck-errors).
- Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.). (https://golangci-lint.run/usage/linters/)
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/[email protected]: 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
Labels
bugSomething isn't workingSomething isn't workingdependenciesRelates to an upstream dependencyRelates to an upstream dependency