1
- # v1.43.0
1
+ # v1.60.1
2
2
# Please don't remove the first line. It uses in CI to determine the golangci version
3
3
run :
4
- deadline : 5m
4
+ timeout : 5m
5
5
6
6
issues :
7
7
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
@@ -10,33 +10,15 @@ issues:
10
10
max-same-issues : 0
11
11
12
12
# We want to try and improve the comments in the k6 codebase, so individual
13
- # non-golint items from the default exclusion list will gradually be addded
13
+ # non-golint items from the default exclusion list will gradually be added
14
14
# to the exclude-rules below
15
15
exclude-use-default : false
16
16
17
- exclude-rules :
18
- # Exclude duplicate code and function length and complexity checking in test
19
- # files (due to common repeats and long functions in test code)
20
- - path : _(test|gen)\.go
21
- linters :
22
- - cyclop
23
- - dupl
24
- - gocognit
25
- - funlen
26
- - lll
27
- - linters :
28
- - paralleltest # false positive: https://github.com/kunwardeep/paralleltest/issues/8.
29
- text : " does not use range value in test Run"
30
-
31
17
linters-settings :
32
18
exhaustive :
33
19
default-signifies-exhaustive : true
34
- govet :
35
- check-shadowing : true
36
20
cyclop :
37
21
max-complexity : 25
38
- maligned :
39
- suggest-new : true
40
22
dupl :
41
23
threshold : 150
42
24
goconst :
@@ -45,37 +27,81 @@ linters-settings:
45
27
funlen :
46
28
lines : 80
47
29
statements : 60
48
- goheader :
49
- template-path : " .license-template"
50
- values :
51
- const :
52
- year : " 2022"
53
- regexp :
54
- year-range : (\d\d\d\d|{{year}})
30
+ forbidigo :
31
+ forbid :
32
+ - ' ^(fmt\\.Print(|f|ln)|print|println)$'
33
+ # Forbid everything in os, except os.Signal and os.SyscalError
34
+ - ' ^os\.(.*)$(# Using anything except Signal and SyscallError from the os package is forbidden )?'
35
+ # Forbid everything in syscall except the uppercase constants
36
+ - ' ^syscall\.[^A-Z_]+$(# Using anything except constants from the syscall package is forbidden )?'
37
+ - ' ^logrus\.Logger$'
55
38
56
39
linters :
57
- enable-all : true
58
- disable :
59
- - nlreturn
60
- - gci
61
- - gochecknoinits
62
- - godot
63
- - godox
64
- - gomodguard
65
- - testpackage
66
- - wsl
67
- - gomnd
68
- - goerr113 # most of the errors here are meant for humans
69
- - goheader
70
- - exhaustivestruct
71
- - thelper
72
- - gocyclo # replaced by cyclop since it also calculates the package complexity
73
- - maligned # replaced by govet 'fieldalignment'
74
- - interfacer # deprecated
75
- - scopelint # deprecated, replaced by exportloopref
76
- - wrapcheck # a little bit too much for k6, maybe after https://github.com/tomarrell/wrapcheck/issues/2 is fixed
77
- - golint # this linter is deprecated
78
- - varnamelen # disabled before the final decision in (https://github.com/grafana/k6/pull/2323)
79
- - ireturn
80
- - tagliatelle
40
+ disable-all : true
41
+ enable :
42
+ - asasalint
43
+ - asciicheck
44
+ - bidichk
45
+ - bodyclose
46
+ - canonicalheader
47
+ - contextcheck
48
+ - cyclop
49
+ - dogsled
50
+ - dupl
51
+ - durationcheck
52
+ - errcheck
53
+ - errchkjson
54
+ - errname
55
+ - errorlint
56
+ - exhaustive
57
+ - exportloopref
58
+ - fatcontext
59
+ - forbidigo
60
+ - forcetypeassert
61
+ - funlen
62
+ - gocheckcompilerdirectives
63
+ - gochecknoglobals
64
+ - gocognit
65
+ - goconst
66
+ - gocritic
67
+ - gofmt
68
+ - gofumpt
69
+ - goimports
70
+ - gomoddirectives
71
+ - goprintffuncname
72
+ - gosec
73
+ - gosimple
74
+ - govet
75
+ - importas
76
+ - ineffassign
77
+ - interfacebloat
78
+ - lll
79
+ - makezero
80
+ - misspell
81
+ - nakedret
82
+ - nestif
83
+ - nilerr
84
+ - nilnil
85
+ - noctx
86
+ - nolintlint
87
+ - nosprintfhostport
88
+ - paralleltest
89
+ - prealloc
90
+ - predeclared
91
+ - promlinter
92
+ - revive
93
+ - reassign
94
+ - rowserrcheck
95
+ - sqlclosecheck
96
+ - staticcheck
97
+ - stylecheck
98
+ - tenv
99
+ - tparallel
100
+ - typecheck
101
+ - unconvert
102
+ - unparam
103
+ - unused
104
+ - usestdlibvars
105
+ - wastedassign
106
+ - whitespace
81
107
fast : false
0 commit comments