22run :
33 # timeout for analysis, e.g. 30s, 5m, default is 1m
44 timeout : 1m
5+ go : " 1.24.1"
56
67issues :
78 # Maximum count of issues with the same text.
@@ -24,22 +25,16 @@ linters:
2425 - errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
2526 - forbidigo # forbids identifiers matched by reg exps
2627 - gomoddirectives # manage the use of 'replace', 'retract', and 'excludes' directives in go.mod.
27- - gosimple # linter for Go source code that specializes in simplifying a code
2828 - misspell # finds commonly misspelled English words in comments
2929 - nakedret # finds naked returns in functions greater than a specified function length
3030 - nolintlint # reports ill-formed or insufficient nolint directives
31- - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
32- - stylecheck # a replacement for golint
3331 - unused # checks Go code for unused constants, variables, functions and types
3432 - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
3533 - ineffassign # detects when assignments to existing variables are not used
36- - structcheck # finds unused struct fields
3734 - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
38- - varcheck # Finds unused global variables and constants
3935 - asciicheck # simple linter to check that your code does not contain non-ASCII identifiers
4036 - bodyclose # checks whether HTTP response body is closed successfully
4137 - durationcheck # check for two durations multiplied together
42- - exportloopref # checks for pointers to enclosing loop variables
4338 - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
4439 - gosec # inspects source code for security problems
4540 - importas # enforces consistent import aliases
@@ -49,6 +44,7 @@ linters:
4944 - wastedassign # wastedassign finds wasted assignment statements.
5045 - gomodguard # check for blocked dependencies in go.mod
5146 - depguard # check for blocked dependencies in Go files
47+ - copyloopvar
5248
5349# all available settings of specific linters
5450linters-settings :
@@ -82,10 +78,6 @@ linters-settings:
8278 # Allow local `replace` directives. Default is false.
8379 replace-local : false
8480
85- gosimple :
86- # Select the Go version to target. The default is '1.13'.
87- go : " 1.22.12"
88-
8981 nakedret :
9082 # make an issue if func has more lines of code than this setting and it has naked returns; default is 30
9183 max-func-lines : 0
@@ -124,21 +116,7 @@ linters-settings:
124116 - pkg : " math/rand$"
125117 desc : " superseded by math/rand/v2"
126118
127- staticcheck :
128- # Select the Go version to target. The default is '1.13'.
129- go : " 1.22.12"
130- # https://staticcheck.io/docs/options#checks
131- checks : ["all"]
132-
133- stylecheck :
134- # Select the Go version to target. The default is '1.13'.
135- go : " 1.22.12"
136- # https://staticcheck.io/docs/options#checks
137- checks : ["all"]
138-
139119 unused :
140- # Select the Go version to target. The default is '1.13'.
141- go : " 1.22.12"
142120
143121 gosec :
144122 excludes :
0 commit comments