1
- # v1.64 .6
1
+ # v2.1 .6
2
2
# Please don't remove the first line. It uses in CI to determine the golangci version
3
+ version : " 2"
3
4
linters :
4
- disable-all : true
5
+ default : none
5
6
enable :
6
7
- asasalint
7
8
- asciicheck
@@ -27,13 +28,9 @@ linters:
27
28
- gocognit
28
29
- goconst
29
30
- gocritic
30
- - gofmt
31
- - gofumpt
32
- - goimports
33
31
- gomoddirectives
34
32
- goprintffuncname
35
33
- gosec
36
- - gosimple
37
34
- govet
38
35
- importas
39
36
- ineffassign
@@ -52,88 +49,82 @@ linters:
52
49
- prealloc
53
50
- predeclared
54
51
- promlinter
55
- - revive
56
52
- reassign
53
+ - revive
57
54
- rowserrcheck
58
55
- sqlclosecheck
59
56
- staticcheck
60
- - stylecheck
61
57
- tparallel
62
- - typecheck
63
58
- unconvert
64
59
- unparam
65
60
- unused
66
61
- usestdlibvars
67
62
- usetesting
68
63
- wastedassign
69
64
- whitespace
70
- fast : false
71
-
72
- run :
73
- timeout : 5m
74
-
65
+ settings :
66
+ cyclop :
67
+ max-complexity : 25
68
+ dupl :
69
+ threshold : 150
70
+ exhaustive :
71
+ default-signifies-exhaustive : true
72
+ forbidigo :
73
+ forbid :
74
+ - pattern : ^(fmt\\.Print(|f|ln)|print|println)$
75
+ - pattern : ^os\.(.*)$(# Using anything except Signal and SyscallError from the os package is forbidden )?
76
+ - pattern : ^syscall\.[^A-Z_]+$(# Using anything except constants from the syscall package is forbidden )?
77
+ - pattern : ^logrus\.Logger$
78
+ funlen :
79
+ lines : 80
80
+ statements : 60
81
+ goconst :
82
+ min-len : 10
83
+ min-occurrences : 4
84
+ usetesting :
85
+ os-setenv : true
86
+ exclusions :
87
+ generated : lax
88
+ rules :
89
+ - linters :
90
+ - canonicalheader
91
+ - cyclop
92
+ - dupl
93
+ - forcetypeassert
94
+ - funlen
95
+ - gocognit
96
+ - lll
97
+ path : _(test|gen)\.go
98
+ - linters :
99
+ - contextcheck
100
+ - revive
101
+ path : js\/modules\/k6\/browser\/.*\.go
102
+ - linters :
103
+ - revive
104
+ path : js\/modules\/k6\/html\/.*\.go
105
+ text : ' exported: exported '
106
+ - linters :
107
+ - paralleltest
108
+ - tparallel
109
+ path : js\/modules\/k6\/http\/.*_test\.go
110
+ - linters :
111
+ - forbidigo
112
+ text : use of `os\.(SyscallError|Signal|Interrupt)` forbidden
113
+ paths :
114
+ - third_party$
115
+ - builtin$
116
+ - examples$
75
117
issues :
76
- # Maximum issues count per one linter. Set to 0 to disable. Default is 50.
77
118
max-issues-per-linter : 0
78
- # Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
79
119
max-same-issues : 0
80
-
81
- # We want to try and improve the comments in the k6 codebase, so individual
82
- # non-golint items from the default exclusion list will gradually be added
83
- # to the exclude-rules below
84
- exclude-use-default : false
85
-
86
- exclude-rules :
87
- # Exclude duplicate code and function length and complexity checking in test
88
- # files (due to common repeats and long functions in test code)
89
- - path : _(test|gen)\.go
90
- linters :
91
- - canonicalheader
92
- - cyclop
93
- - dupl
94
- - gocognit
95
- - funlen
96
- - lll
97
- - forcetypeassert
98
- - path : js\/modules\/k6\/browser\/.*\.go
99
- linters :
100
- - revive
101
- - contextcheck
102
- - path : js\/modules\/k6\/html\/.*\.go
103
- text : " exported: exported "
104
- linters :
105
- - revive
106
- - path : js\/modules\/k6\/http\/.*_test\.go
107
- linters :
108
- # k6/http module's tests are quite complex because they often have several nested levels.
109
- # The module is in maintenance mode, so we don't intend to port the tests to a parallel version.
110
- - paralleltest
111
- - tparallel
112
- - linters :
113
- - forbidigo
114
- text : ' use of `os\.(SyscallError|Signal|Interrupt)` forbidden'
115
-
116
- linters-settings :
117
- exhaustive :
118
- default-signifies-exhaustive : true
119
- cyclop :
120
- max-complexity : 25
121
- dupl :
122
- threshold : 150
123
- goconst :
124
- min-len : 10
125
- min-occurrences : 4
126
- funlen :
127
- lines : 80
128
- statements : 60
129
- forbidigo :
130
- forbid :
131
- - ' ^(fmt\\.Print(|f|ln)|print|println)$'
132
- # Forbid everything in os, except os.Signal and os.SyscalError
133
- - ' ^os\.(.*)$(# Using anything except Signal and SyscallError from the os package is forbidden )?'
134
- # Forbid everything in syscall except the uppercase constants
135
- - ' ^syscall\.[^A-Z_]+$(# Using anything except constants from the syscall package is forbidden )?'
136
- - ' ^logrus\.Logger$'
137
- usetesting :
138
- os-setenv : true
139
-
120
+ formatters :
121
+ enable :
122
+ - gofmt
123
+ - gofumpt
124
+ - goimports
125
+ exclusions :
126
+ generated : lax
127
+ paths :
128
+ - third_party$
129
+ - builtin$
130
+ - examples$
0 commit comments