You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
golanci-lint version: 2.0.0
VS Code version version: 1.98.2
VS Code Go extension version: 0.46.1
The VS Code integration suggested here doesn't seem to be working for the linters as I can't see any problems raised, however, when I run golangci-lint run --fast-only from the terminal there are errors being flagged. See details on the verbose output section.
Worth mentioning that the same settings work for the formatter as expected.
Version of golangci-lint
$ golangci-lint --versiongolangci-lint has version 2.0.0 built with go1.24.1 from f1f8343d on 2025-03-24T12:12:51Z
$ go version && go envgo version go1.24.0 linux/amd64AR='ar'CC='gcc'CGO_CFLAGS='-O2 -g'CGO_CPPFLAGS=''CGO_CXXFLAGS='-O2 -g'CGO_ENABLED='1'CGO_FFLAGS='-O2 -g'CGO_LDFLAGS='-O2 -g'CXX='g++'GCCGO='gccgo'GO111MODULE=''GOAMD64='v1'GOARCH='amd64'GOAUTH='netrc'GOBIN='/home/jrodr/.asdf/installs/golang/1.24.0/bin'GOCACHE='/home/jrodr/.cache/go-build'GOCACHEPROG=''GODEBUG=''GOENV='/home/jrodr/.config/go/env'GOEXE=''GOEXPERIMENT=''GOFIPS140='off'GOFLAGS=''GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1356778624=/tmp/go-build -gno-record-gcc-switches'GOHOSTARCH='amd64'GOHOSTOS='linux'GOINSECURE=''GOMOD='/home/jrodr/custom-dir/go.mod'GOMODCACHE='/home/jrodr/.asdf/installs/golang/1.24.0/packages/pkg/mod'GONOPROXY=''GONOSUMDB=''GOOS='linux'GOPATH='/home/jrodr/.asdf/installs/golang/1.24.0/packages'GOPRIVATE=''GOPROXY='https://proxy.golang.org,direct'GOROOT='/home/jrodr/.asdf/installs/golang/1.24.0/go'GOSUMDB='sum.golang.org'GOTELEMETRY='local'GOTELEMETRYDIR='/home/jrodr/.config/go/telemetry'GOTMPDIR=''GOTOOLCHAIN='auto'GOTOOLDIR='/home/jrodr/.asdf/installs/golang/1.24.0/go/pkg/tool/linux_amd64'GOVCS=''GOVERSION='go1.24.0'GOWORK=''PKG_CONFIG='pkg-config'
Verbose output of running
$ golangci-lint cache clean
$ golangci-lint run -vINFO golangci-lint has version 2.0.0 built with go1.24.1 from f1f8343d on 2025-03-24T12:12:51ZINFO [config_reader] Config search paths: [./ /home/jrodr/custom-dir /home/jrodr /home /]INFO [config_reader] Used config file .golangci.yamlINFO maxprocs: Leaving GOMAXPROCS=20: CPU quota undefinedINFO [goenv] Read go env for 52.673652ms: map[string]string{"GOCACHE":"/home/jrodr/.cache/go-build", "GOROOT":"/home/jrodr/.asdf/installs/golang/1.24.0/go"}INFO [lintersdb] Active 10 linters: [cyclop errcheck forcetypeassert gocognit gofumpt govet ineffassign staticcheck testifylint unused]INFO [loader] Go packages loading at mode 8767 (name|compiled_files|exports_file|types_sizes|deps|files|imports) took 223.82576msINFO [runner/filename_unadjuster] Pre-built 0 adjustments in 389.821µsINFO [linters_context/goanalysis] analyzers took 15.49214736s with top 10 stages: buildir: 12.494529633s, inspect: 929.649542ms, ctrlflow: 505.467936ms, fact_deprecated: 347.633285ms, printf: 270.023905ms, SA5012: 256.212075ms, fact_purity: 210.328604ms, nilness: 193.50903ms, typedness: 152.262753ms, tokenfileanalyzer: 72.353203msINFO [runner/max_same_issues] 2/5 issues with text "error-nil: use assert.NoError" were hidden, use --max-same-issuesINFO [runner] Issues before processing: 16, after processing: 14INFO [runner] Processors filtering stat (in/out): exclusion_paths: 16/16, exclusion_rules: 16/16, max_same_issues: 16/14, max_from_linter: 14/14, path_prettifier: 14/14, sort_results: 14/14, filename_unadjuster: 16/16, path_relativity: 16/16, nolint_filter: 16/16, fixer: 16/16, max_per_file_from_linter: 16/16, source_code: 14/14, severity-rules: 14/14, cgo: 16/16, uniq_by_line: 16/16, generated_file_filter: 16/16, diff: 16/16, path_shortener: 14/14, path_absoluter: 16/16, invalid_issue: 16/16INFO [runner] processing took 492.672µs with stages: nolint_filter: 291.767µs, source_code: 95.902µs, generated_file_filter: 43.001µs, max_same_issues: 28.55µs, sort_results: 8.501µs, path_relativity: 8.239µs, uniq_by_line: 4.76µs, max_from_linter: 2.703µs, path_shortener: 1.747µs, cgo: 1.417µs, path_absoluter: 1.123µs, invalid_issue: 962ns, filename_unadjuster: 839ns, max_per_file_from_linter: 758ns, exclusion_rules: 708ns, path_prettifier: 523ns, fixer: 424ns, exclusion_paths: 376ns, diff: 279ns, severity-rules: 93nsINFO [runner] linters took 5.527625231s with stages: goanalysis_metalinter: 5.527089363sjob/job.go:25:1: calculated cyclomatic complexity for function UnmarshalJSON is 16, max is 10 (cyclop)func (j *Job) UnmarshalJSON(data []byte) error {^cmd/root.go:28:10: Error return value of `cmd.Help` is not checked (errcheck) cmd.Help() ^job/job_test.go:107:3: type assertion must be checked (forcetypeassert) dbExport := got.Actions[0].(*actions.DbExport) ^job/job_test.go:144:3: type assertion must be checked (forcetypeassert) email := got.Actions[0].(*actions.Email) ^database/tests/database_test.go:13:2: error-nil: use assert.NoError (testifylint) assert.Nil(t, err) ^database/tests/database_test.go:19:2: error-nil: use assert.NoError (testifylint) assert.Nil(t, err) ^job/actions/dbExport_test.go:10:2: useless-assert: asserting of the same variable (testifylint) assert.Equal(t, 1, 1) ^job/actions/email_test.go:10:2: useless-assert: asserting of the same variable (testifylint) assert.Equal(t, 1, 1) ^job/job_test.go:32:3: error-nil: use assert.NoError (testifylint) assert.Nil(err) ^job/job_test.go:47:3: error-nil: use assert.Error (testifylint) assert.NotNil(err) ^job/job_test.go:48:3: expected-actual: need to reverse actual and expected values (testifylint) assert.Equal(err.Error(), "the job name is not specified or is not a string") ^job/job_test.go:64:3: error-nil: use assert.Error (testifylint) assert.NotNil(t, err) ^job/job_test.go:65:3: expected-actual: need to reverse actual and expected values (testifylint) assert.Equal(t, err.Error(), "the action type is not specified or is not a string") ^job/job_test.go:80:3: error-nil: use assert.Error (testifylint) assert.NotNil(t, err) ^14 issues:* cyclop: 1* errcheck: 1* forcetypeassert: 2* testifylint: 10INFO File cache stats: 6 entries of total size 7.3KiBINFO Memory: 60 samples, avg is 1016.0MB, max is 1732.4MBINFO Execution took 5.804899692s
$ golangci-lint run --fast-onlyjob/job.go:25:1: calculated cyclomatic complexity for function UnmarshalJSON is 16, max is 10 (cyclop)func (j *Job) UnmarshalJSON(data []byte) error {^1 issues:* cyclop: 1
A minimal reproducible example or link to a public repository
N/A
Validation
Yes, I've included all information above (version, config, etc.).
Welcome
typecheck
section of the FAQ.How did you install golangci-lint?
Official binary
Description of the problem
golanci-lint version: 2.0.0
VS Code version version: 1.98.2
VS Code Go extension version: 0.46.1
The VS Code integration suggested here doesn't seem to be working for the linters as I can't see any problems raised, however, when I run
golangci-lint run --fast-only
from the terminal there are errors being flagged. See details on the verbose output section.Worth mentioning that the same settings work for the formatter as expected.
Version of golangci-lint
Configuration
.golangci.yaml
vscode
settings.json
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
N/A
Validation
Supporter
The text was updated successfully, but these errors were encountered: