$ golangci-lint cache clean
$ golangci-lint run -v
level=info msg="golangci-lint has version 2.11.1 built with go1.26.1 from 89a46a2 on 2026-03-06T13:59:43Z"
level=info msg="[config_reader] Config search paths: [./ /Users/david/dev/go/jsonpath /Users/david/dev/go /Users/david/dev /Users/david /Users /]"
level=info msg="[config_reader] Used config file .golangci.yaml"
level=info msg="[config_reader] Module name \"github.com/theory/jsonpath\""
level=info msg="[goenv] Read go env for 8.214625ms: map[string]string{\"GOCACHE\":\"/Users/david/Library/Caches/go-build\", \"GOROOT\":\"/opt/homebrew/Cellar/go/1.26.1/libexec\"}"
level=info msg="[lintersdb] Active 105 linters: [arangolint asasalint asciicheck bidichk bodyclose canonicalheader containedctx contextcheck copyloopvar decorder dogsled dupl dupword durationcheck embeddedstructfieldcheck err113 errcheck errchkjson errname errorlint exhaustive exptostd fatcontext forbidigo forcetypeassert funlen gci ginkgolinter gocheckcompilerdirectives gochecknoglobals gochecknoinits gochecksumtype gocognit goconst gocritic gocyclo godoclint godot godox gofmt gofumpt goheader goimports gomoddirectives gomodguard goprintffuncname gosec gosmopolitan govet grouper iface importas inamedparam ineffassign interfacebloat intrange iotamixing ireturn lll loggercheck maintidx makezero mirror misspell mnd modernize musttag nakedret nilerr nilnesserr nilnil noctx nolintlint nonamedreturns nosprintfhostport paralleltest perfsprint prealloc predeclared promlinter protogetter reassign recvcheck revive rowserrcheck sloglint spancheck sqlclosecheck staticcheck tagalign tagliatelle testableexamples testifylint thelper tparallel unconvert unparam unqueryvet unused usestdlibvars usetesting wastedassign whitespace wrapcheck zerologlint]"
level=info msg="[loader] Using build tags: [compare]"
level=info msg="[loader] Go packages loading at mode 8767 (compiled_files|exports_file|files|imports|deps|name|types_sizes) took 152.209583ms"
level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 4.875667ms"
level=info msg="[linters_context] importas settings found, but no aliases listed. List aliases under alias: key."
level=info msg="[linters_context/goanalysis] analyzers took 16.37172386s with top 10 stages: wastedassign: 1.060729583s, gosec: 829.133708ms, goimports: 626.377875ms, dupl: 435.307375ms, gofumpt: 385.120667ms, errorlint: 363.249375ms, gci: 335.521792ms, buildir: 307.98246ms, unqueryvet: 282.136083ms, misspell: 259.413ms"
level=info msg="[runner/exclusion_paths] Skipped 0 issues by pattern \"third_party$\""
level=info msg="[runner/exclusion_paths] Skipped 0 issues by pattern \"builtin$\""
level=info msg="[runner/exclusion_paths] Skipped 0 issues by pattern \"examples$\""
level=info msg="[runner/exclusion_rules] Skipped 55 issues by rules: [Path: \"_test\\\\.go\", Linters: \"err113, funlen, maintidx, wrapcheck\"]"
level=info msg="[runner/exclusion_rules] Skipped 10 issues by rules: [Path: \"registry/funcs\\\\.go\", Linters: \"err113\"]"
level=info msg="[runner/exclusion_rules] Skipped 0 issues by rules: [Path: \"third_party$\", Linters: \"gci, gofmt, gofumpt, goimports\"]"
level=info msg="[runner/exclusion_rules] Skipped 0 issues by rules: [Path: \"builtin$\", Linters: \"gci, gofmt, gofumpt, goimports\"]"
level=info msg="[runner/exclusion_rules] Skipped 0 issues by rules: [Path: \"examples$\", Linters: \"gci, gofmt, gofumpt, goimports\"]"
level=info msg="[runner] Issues before processing: 85, after processing: 1"
level=info msg="[runner] Processors filtering stat (in/out): uniq_by_line: 1/1, max_from_linter: 1/1, source_code: 1/1, path_prettifier: 1/1, exclusion_rules: 80/15, severity-rules: 1/1, sort_results: 1/1, nolint_filter: 15/1, diff: 1/1, path_absoluter: 85/85, cgo: 85/85, path_relativity: 85/85, exclusion_paths: 85/85, max_per_file_from_linter: 1/1, max_same_issues: 1/1, path_shortener: 1/1, filename_unadjuster: 85/85, invalid_issue: 85/85, generated_file_filter: 85/80, fixer: 1/1"
level=info msg="[runner] processing took 2.259121ms with stages: nolint_filter: 1.749874ms, generated_file_filter: 345.917µs, exclusion_rules: 59.583µs, path_relativity: 42.666µs, source_code: 26.5µs, exclusion_paths: 23.125µs, sort_results: 2.791µs, invalid_issue: 2.084µs, cgo: 1.999µs, path_absoluter: 999ns, max_same_issues: 707ns, uniq_by_line: 667ns, path_shortener: 417ns, max_from_linter: 416ns, filename_unadjuster: 374ns, fixer: 334ns, path_prettifier: 250ns, diff: 209ns, max_per_file_from_linter: 167ns, severity-rules: 42ns"
level=info msg="[runner] linters took 1.408081417s with stages: goanalysis_metalinter: 1.405788667s"
spec/selector.go:308:21: G602: slice index out of range (gosec)
switch end := args[endArg].(type) {
^
1 issues:
* gosec: 1
level=info msg="File cache stats: 1 entries of total size 15.4KiB"
level=info msg="Memory: 17 samples, avg is 197.0MB, max is 363.6MB"
level=info msg="Execution took 1.582326375s"
Welcome
typechecksection of the FAQ.How did you install golangci-lint?
Brew
Description of the problem
securego/gosec#1250 fixed in gosec but not golangci-lint. From my project:
But with gosec (installed from source today):
gosec looks to be the latest version, so I'm not sure why it's still reporting the issue.
Version of golangci-lint
Details
Configuration
Details
Go environment
Details
Verbose output of running
Details
A minimal reproducible example or link to a public repository
Details
From https://github.com/theory/jsonpath/:
Validation
Supporter