|
| 1 | +run: |
| 2 | + deadline: 5m |
| 3 | + |
| 4 | +linters: |
| 5 | + enable: |
| 6 | + - asasalint # check for pass []any as any in variadic func(...any) |
| 7 | + - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers |
| 8 | + - bidichk # Checks for dangerous unicode character sequences |
| 9 | + - containedctx # detects struct contained context.Context field |
| 10 | + - contextcheck # check the function whether use a non-inherited context |
| 11 | + - cyclop # checks function and package cyclomatic complexity |
| 12 | + - decorder # check declaration order and count of types, constants, variables and functions |
| 13 | + - depguard # Go linter that checks if package imports are in a list of acceptable packages |
| 14 | + - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f()) |
| 15 | + - durationcheck # check for two durations multiplied together |
| 16 | + - errcheck # checking for unchecked errors |
| 17 | + - errname # Checks that errors are prefixed with the `Err` and error types are suffixed with the `Error` |
| 18 | + - errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13 |
| 19 | + - exportloopref # checks for pointers to enclosing loop variables |
| 20 | + - funlen # Tool for detection of long functions |
| 21 | + - gci # controls golang package import order and makes it always deterministic |
| 22 | + - gocognit # Computes and checks the cognitive complexity of functions |
| 23 | + - gocritic # Provides diagnostics that check for bugs, performance and style issues |
| 24 | + - gocyclo # Computes and checks the cyclomatic complexity of functions |
| 25 | + - godot # Check if comments end in a period |
| 26 | + - goerr113 # Golang linter to check the errors handling expressions |
| 27 | + - gosimple # Linter for Go source code that specializes in simplifying a code |
| 28 | + - govet # reports suspicious constructs, such as Printf calls with wrong arguments |
| 29 | + - ineffassign # Detects when assignments to existing variables are not used |
| 30 | + - maintidx # measures the maintainability index of each function |
| 31 | + - makezero # Finds slice declarations with non-zero initial length |
| 32 | + - misspell # Finds commonly misspelled English words in comments |
| 33 | + - nakedret # Finds naked returns in functions |
| 34 | + - nestif # Reports deeply nested if statements |
| 35 | + - nilerr # Finds the code that returns nil even if it checks that the error is not nil |
| 36 | + - nilnil # Checks that there is no simultaneous return of `nil` error and an invalid value |
| 37 | + - prealloc # Finds slice declarations that could potentially be preallocated |
| 38 | + - predeclared # find code that shadows one of Go's predeclared identifiers |
| 39 | + - revive # drop-in replacement of golint |
| 40 | + - staticcheck # drop-in replacement of go vet |
| 41 | + - stylecheck # Stylecheck is a replacement for golint |
| 42 | + - tenv # detects using os.Setenv instead of t.Setenv |
| 43 | + - thelper # checks the consistency of test helpers |
| 44 | + - tparallel # detects inappropriate usage of t.Parallel() |
| 45 | + - typecheck # parses and type-checks Go code |
| 46 | + - unconvert # Remove unnecessary type conversions |
| 47 | + - unparam # Reports unused function parameters |
| 48 | + - unused # Checks Go code for unused constants, variables, functions and types |
| 49 | + - usestdlibvars # detect the possibility to use variables/constants from the Go standard library |
| 50 | + - wastedassign # finds wasted assignment statements |
| 51 | + - whitespace # detects leading and trailing whitespace |
| 52 | + |
| 53 | +issues: |
| 54 | + exclude-use-default: false |
| 55 | + exclude-rules: |
| 56 | + - linters: |
| 57 | + - goerr113 |
| 58 | + text: "do not define dynamic errors" |
0 commit comments