Closed
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/welcome/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
In the 1.58.0 release, github-actions output print fails w/ the following error: (GHA logs)
Error: Unable to process command '::add-matcher::/tmp/golangci-lint-action-problem-matchers.json' successfully.
Error: Could not find file '/tmp/golangci-lint-action-problem-matchers.json'
The same linting action is working fine w/ golangci-lint v1.57
Version of golangci-lint
$ golangci-lint --version
golangci-lint has version 1.58.0 built with go1.22.2 from 28b3813c on 2024-05-03T18:05:38Z
Configuration
--out-format=github-actions --path-prefix=src/core/kpp-api --config=../../.golangci.yml --timeout=10m
linters:
enable:
- bodyclose
- containedctx
- decorder
- depguard
- dogsled
- dupword
- errcheck
- errchkjson
- errname
- errorlint
- exhaustive
- goconst
- gocritic
- gofmt
- goimports
- gomodguard
- gosec
- gosimple
- govet
- maintidx
- makezero
- misspell
- musttag
- nakedret
- nilerr
- nilnil
- noctx
- nolintlint
- nosprintfhostport
- revive
- thelper
- typecheck
- unconvert
- unused
- usestdlibvars
- whitespace
issues:
include:
- EXC0012 # EXC0012 revive: Annoying issue about not having a comment. The rare codebase has such comments
exclude-rules:
- path: '(.+)_test\.go'
linters:
# table-driven tests have growing lists of test cases
# which trigger maintidx's "too complex" verdict
- maintidx
linters-settings:
depguard:
rules:
main:
allow:
- $gostd
- bits.linode.com
- helm.sh
- k8s.io
- sigs.k8s.io
- dario.cat/mergo
- filippo.io/age
- github.com/aws/aws-sdk-go
- github.com/gin-gonic/gin
- github.com/gin-contrib/logger
- github.com/go-logr
- github.com/hashicorp
- github.com/helm/helm/pkg/engine
- github.com/linode
- github.com/rs/zerolog
- github.com/spf13
- github.com/stretchr/testify/assert
- github.com/go-git/go-billy/v5/osfs
- github.com/go-git/go-git/v5
- github.com/ianschenck/envflag
- github.com/gin-contrib/logger
- github.com/gin-contrib/graceful
- github.com/swaggo
- github.com/google
- github.com/akamai/AkamaiOPEN-edgegrid-golang/v7
- github.com/apex/log
- github.com/crossplane/crossplane-runtime
- github.com/prometheus/client_golang/prometheus
- github.com/prometheus/common/expfmt
- github.com/fsnotify/fsnotify
revive:
rules:
- name: exported
arguments: ["checkPrivateReceivers", "disableStutteringCheck"]
Go environment
$ go version && go env
go version go1.21.5 linux/amd64
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/tmp/tmp.g37yoMdf3y/gocache'
GOENV='/github/home/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/tmp/tmp.g37yoMdf3y/gomodcache'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/github/home/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/__t/go/1.21.5/x64'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/__t/go/1.21.5/x64/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.5'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='0'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
Verbose output of running
$ golangci-lint cache clean
$ golangci-lint run -v
Running [/github/home/golangci-lint-1.58.0-linux-amd64/golangci-lint run --out-format=github-actions --path-prefix=src/core/kpp-api --config=${GITHUB_WORKSPACE}/src/.golangci.yml --timeout=10m --verbose] in [/__w/kpp-services/kpp-services/src/core/kpp-api] ...
Error: Unable to process command '::add-matcher::/tmp/golangci-lint-action-problem-matchers.json' successfully.
Error: Could not find file '/tmp/golangci-lint-action-problem-matchers.json'.
level=info msg="[config_reader] Used config file ../../.golangci.yml"
level=info msg="[lintersdb] Active 37 linters: [bodyclose containedctx decorder depguard dogsled dupword errcheck errchkjson errname errorlint exhaustive goconst gocritic gofmt goimports gomodguard gosec gosimple govet ineffassign maintidx makezero misspell musttag nakedret nilerr nilnil noctx nolintlint nosprintfhostport revive staticcheck thelper unconvert unused usestdlibvars whitespace]"
level=info msg="[loader] Go packages loading at mode 575 (files|imports|name|exports_file|deps|types_sizes|compiled_files) took 39.4366455[31](https://bits.linode.com/CNS/kpp-services/actions/runs/263033/job/705302?pr=519#step:7:33)s"
level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 9.265609ms"
level=info msg="[linters_context/goanalysis] analyzers took 1m38.335811263s with top 10 stages: buildir: 1m16.889408652s, exhaustive: 3.512448189s, inspect: 3.473982183s, fact_deprecated: 2.290792748s, nilness: 2.204405153s, ctrlflow: 2.04248517s, printf: 1.796923649s, fact_purity: 1.476338989s, typedness: 796.471927ms, SA5012: 717.462302ms"
level=info msg="[runner] Issues before processing: 19, after processing: 0"
level=info msg="[runner] Processors filtering stat (out/in): cgo: 19/19, filename_unadjuster: 19/19, skip_dirs: 19/19, identifier_marker: 19/19, exclude-rules: 0/19, invalid_issue: 19/19, path_prettifier: 19/19, skip_files: 19/19, autogenerated_exclude: 19/19, exclude: 19/19"
level=info msg="[runner] processing took 2.[32](https://bits.linode.com/CNS/kpp-services/actions/runs/263033/job/705302?pr=519#step:7:34)4684ms with stages: exclude-rules: 943.336µs, identifier_marker: 766.101µs, path_prettifier: 295.378µs, autogenerated_exclude: 187.176µs, skip_dirs: 80.122µs, filename_unadjuster: 36.801µs, cgo: 8.59µs, invalid_issue: 2.58µs, max_same_issues: 800ns, nolint: 780ns, uniq_by_line: 550ns, skip_files: 480ns, fixer: [35](https://bits.linode.com/CNS/kpp-services/actions/runs/263033/job/705302?pr=519#step:7:37)0ns, exclude: 260ns, sort_results: 220ns, diff: 190ns, severity-rules: 190ns, max_from_linter: 180ns, path_prefixer: 180ns, source_code: 150ns, path_shortener: 140ns, max_per_file_from_linter: 130ns"
level=info msg="[runner] linters took 18.751607084s with stages: goanalysis_metalinter: 18.748486136s"
level=info msg="File cache stats: 20 entries of total size 264.7KiB"
level=info msg="Memory: 573 samples, avg is 358.4MB, max is 1583.7MB"
level=info msg="Execution took 58.205542098s"
golangci-lint found no issues
Ran golangci-lint in 58474ms
A minimal reproducible example or link to a public repository
The issue isn't about any specific linting rule :shr
Validation
- Yes, I've included all information above (version, config, etc.).