1+ version : " 2"
12run :
2- timeout : 5m
3+ modules-download-mode : readonly
34
45linters :
56 enable :
89 - bidichk # Checks for dangerous unicode character sequences
910 - containedctx # detects struct contained context.Context field
1011 - contextcheck # check the function whether use a non-inherited context
12+ - copyloopvar # detects places where loop variables are copied
1113 - cyclop # checks function and package cyclomatic complexity
1214 - decorder # check declaration order and count of types, constants, variables and functions
1315 - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
@@ -17,18 +19,15 @@ linters:
1719 - errname # Checks that errors are prefixed with the `Err` and error types are suffixed with the `Error`
1820 - errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13
1921 - funlen # Tool for detection of long functions
20- - gci # controls golang package import order and makes it always deterministic
2122 - gocheckcompilerdirectives # Checks that go compiler directive comments (//go:) are valid
2223 - gocognit # Computes and checks the cognitive complexity of functions
2324 - gocritic # Provides diagnostics that check for bugs, performance and style issues
2425 - gocyclo # Computes and checks the cyclomatic complexity of functions
2526 - godot # Check if comments end in a period
26- - gofmt # checks whether code was gofmt-ed
27- - goimports # Check import statements are formatted according to the 'goimport' command
28- - gosimple # Linter for Go source code that specializes in simplifying a code
2927 - govet # reports suspicious constructs, such as Printf calls with wrong arguments
3028 - grouper # An analyzer to analyze expression groups
3129 - ineffassign # Detects when assignments to existing variables are not used
30+ - intrange # finds places where for loops could make use of an integer range.
3231 - maintidx # measures the maintainability index of each function
3332 - makezero # Finds slice declarations with non-zero initial length
3433 - mirror # reports wrong mirror patterns of bytes/strings usage
@@ -43,35 +42,38 @@ linters:
4342 - reassign # Checks that package variables are not reassigned
4443 - revive # drop-in replacement of golint
4544 - staticcheck # drop-in replacement of go vet
46- - stylecheck # Stylecheck is a replacement for golint
4745 - testifylint # Checks usage of github.com/stretchr/testify
4846 - thelper # checks the consistency of test helpers
4947 - tparallel # detects inappropriate usage of t.Parallel()
50- - typecheck # parses and type-checks Go code
5148 - unconvert # Remove unnecessary type conversions
5249 - unparam # Reports unused function parameters
5350 - unused # Checks Go code for unused constants, variables, functions and types
5451 - 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
5652 - wastedassign # finds wasted assignment statements
5753 - whitespace # detects leading and trailing whitespace
5854 - wrapcheck # Checks that errors returned from external packages are wrapped
5955
60- linters-settings :
61- cyclop :
62- max-complexity : 15
63- gocritic :
64- disabled-checks :
65- - newDeref
66- govet :
67- disable :
68- - unsafeptr
69- staticcheck :
70- # TODO SA1019 deprecated usage
71- checks : [ "all", "-SA1019" ]
56+ settings :
57+ cyclop :
58+ max-complexity : 15
59+ govet :
60+ disable :
61+ - unsafeptr
62+ staticcheck :
63+ checks :
64+ - all
65+ - ' -SA1019' # should not use deprecated functions
66+ whitespace :
67+ multi-if : true # Enforces newlines (or comments) after every multi-line if statement
68+ multi-func : true # Enforces newlines (or comments) after every multi-line function signature
69+ exclusions :
70+ rules :
71+ - linters :
72+ - err113
73+ text : do not define dynamic errors
7274
73- issues :
74- exclude-rules :
75- - linters :
76- - err113
77- text : " do not define dynamic errors "
75+ formatters :
76+ enable :
77+ - gci # controls golang package import order and makes it always deterministic
78+ - gofmt # checks whether code was gofmt-ed
79+ - goimports # Check import statements are formatted according to the 'goimport' command
0 commit comments