11run :
2- deadline : 5m
2+ timeout : 5m
33
44linters :
55 enable :
66 - asasalint # check for pass []any as any in variadic func(...any)
77 - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
88 - bidichk # Checks for dangerous unicode character sequences
99 - containedctx # detects struct contained context.Context field
10- - contextcheck # check the function whether to use a non-inherited context
10+ - contextcheck # check the function whether use a non-inherited context
1111 - cyclop # checks function and package cyclomatic complexity
1212 - decorder # check declaration order and count of types, constants, variables and functions
1313 - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
1414 - durationcheck # check for two durations multiplied together
15+ - err113 # Golang linter to check the errors handling expressions
1516 - errcheck # checking for unchecked errors
1617 - errname # Checks that errors are prefixed with the `Err` and error types are suffixed with the `Error`
1718 - errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13
18- - exportloopref # checks for pointers to enclosing loop variables
1919 - funlen # Tool for detection of long functions
2020 - gci # controls golang package import order and makes it always deterministic
21+ - gocheckcompilerdirectives # Checks that go compiler directive comments (//go:) are valid
2122 - gocognit # Computes and checks the cognitive complexity of functions
2223 - gocritic # Provides diagnostics that check for bugs, performance and style issues
2324 - gocyclo # Computes and checks the cyclomatic complexity of functions
2425 - godot # Check if comments end in a period
25- - goerr113 # Golang linter to check the errors handling expressions
2626 - gofmt # checks whether code was gofmt-ed
27+ - goimports # Check import statements are formatted according to the 'goimport' command
2728 - gosimple # Linter for Go source code that specializes in simplifying a code
2829 - govet # reports suspicious constructs, such as Printf calls with wrong arguments
30+ - grouper # An analyzer to analyze expression groups
2931 - ineffassign # Detects when assignments to existing variables are not used
3032 - maintidx # measures the maintainability index of each function
3133 - makezero # Finds slice declarations with non-zero initial length
34+ - mirror # reports wrong mirror patterns of bytes/strings usage
3235 - misspell # Finds commonly misspelled English words in comments
3336 - nakedret # Finds naked returns in functions
3437 - nestif # Reports deeply nested if statements
3538 - nilerr # Finds the code that returns nil even if it checks that the error is not nil
3639 - nilnil # Checks that there is no simultaneous return of `nil` error and an invalid value
37- - prealloc # Finds slice declarations that could potentially be pre-allocated
40+ - perfsprint # Checks that fmt.Sprintf can be replaced with a faster alternative
41+ - prealloc # Finds slice declarations that could potentially be preallocated
3842 - predeclared # find code that shadows one of Go's predeclared identifiers
43+ - reassign # Checks that package variables are not reassigned
3944 - revive # drop-in replacement of golint
4045 - staticcheck # drop-in replacement of go vet
41- - stylecheck # replacement for golint
42- - tenv # detects using os.Setenv instead of t.Setenv
46+ - stylecheck # Stylecheck is a replacement for golint
47+ - testifylint # Checks usage of github.com/stretchr/testify
4348 - thelper # checks the consistency of test helpers
4449 - tparallel # detects inappropriate usage of t.Parallel()
4550 - typecheck # parses and type-checks Go code
4651 - unconvert # Remove unnecessary type conversions
4752 - unparam # Reports unused function parameters
4853 - unused # Checks Go code for unused constants, variables, functions and types
4954 - usestdlibvars # detect the possibility to use variables/constants from the Go standard library
55+ - usetesting # Reports uses of functions with replacement inside the testing package
5056 - wastedassign # finds wasted assignment statements
5157 - whitespace # detects leading and trailing whitespace
58+ - wrapcheck # Checks that errors returned from external packages are wrapped
5259
5360linters-settings :
5461 cyclop :
@@ -59,10 +66,12 @@ linters-settings:
5966 govet :
6067 disable :
6168 - unsafeptr
69+ staticcheck :
70+ # TODO SA1019 deprecated usage
71+ checks : [ "all", "-SA1019" ]
6272
6373issues :
64- exclude-use-default : false
6574 exclude-rules :
6675 - linters :
67- - goerr113
76+ - err113
6877 text : " do not define dynamic errors"
0 commit comments