1- # v1.64.8
1+ # v2.11.4
22# Please don't remove the first line. It is used in CI to determine the golangci version
3+
4+ version : " 2"
5+
36run :
47 timeout : 5m
58
@@ -9,62 +12,14 @@ issues:
912 # Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
1013 max-same-issues : 0
1114
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 added
14- # to the exclude-rules below
15- exclude-use-default : false
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- - staticcheck
29- # Tracked in https://github.com/grafana/xk6-grpc/issues/14
30- text : " The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated."
31- - linters :
32- - staticcheck
33- # tracked in https://github.com/grafana/xk6-kubernetes/issues/135
34- text : ' SA1019: corev1.EndpointSubset is deprecated'
35- - linters :
36- - staticcheck
37- # tracked in https://github.com/grafana/xk6-kubernetes/issues/135
38- text : ' SA1019: corev1.Endpoints is deprecated'
39-
40- - linters :
41- - forbidigo
42- text : ' use of `os\.(SyscallError|Signal|Interrupt)` forbidden'
43-
44- linters-settings :
45- exhaustive :
46- default-signifies-exhaustive : true
47- cyclop :
48- max-complexity : 25
49- dupl :
50- threshold : 150
51- goconst :
52- min-len : 10
53- min-occurrences : 4
54- funlen :
55- lines : 80
56- statements : 60
57- forbidigo :
58- forbid :
59- - ' ^(fmt\\.Print(|f|ln)|print|println)$'
60- # Forbid everything in os, except os.Signal and os.SyscalError
61- - ' ^os\.(.*)$(# Using anything except Signal and SyscallError from the os package is forbidden )?'
62- # Forbid everything in syscall except the uppercase constants
63- - ' ^syscall\.[^A-Z_]+$(# Using anything except constants from the syscall package is forbidden )?'
64- - ' ^logrus\.Logger$'
15+ formatters :
16+ enable :
17+ - gofmt
18+ - gofumpt
19+ - goimports
6520
6621linters :
67- disable-all : true
22+ default : none
6823 enable :
6924 - asasalint
7025 - asciicheck
@@ -88,13 +43,9 @@ linters:
8843 - gocognit
8944 - goconst
9045 - gocritic
91- - gofmt
92- - gofumpt
93- - goimports
9446 - gomoddirectives
9547 - goprintffuncname
9648 - gosec
97- - gosimple
9849 - govet
9950 - importas
10051 - ineffassign
@@ -118,14 +69,63 @@ linters:
11869 - rowserrcheck
11970 - sqlclosecheck
12071 - staticcheck
121- - stylecheck
12272 - tparallel
123- - typecheck
12473 - unconvert
12574 - unparam
12675 - unused
12776 - usestdlibvars
12877 - usetesting
12978 - wastedassign
13079 - whitespace
131- fast : false
80+
81+ settings :
82+ exhaustive :
83+ default-signifies-exhaustive : true
84+ cyclop :
85+ max-complexity : 25
86+ dupl :
87+ threshold : 150
88+ goconst :
89+ min-len : 10
90+ min-occurrences : 4
91+ funlen :
92+ lines : 80
93+ statements : 60
94+ forbidigo :
95+ forbid :
96+ - pattern : ' ^(fmt\.Print(|f|ln)|print|println)$'
97+ - pattern : ' ^os\.(.*)$'
98+ msg : " Using anything except Signal and SyscallError from the os package is forbidden"
99+ - pattern : ' ^syscall\.[^A-Z_]+$'
100+ msg : " Using anything except constants from the syscall package is forbidden"
101+ - pattern : ' ^logrus\.Logger$'
102+
103+ exclusions :
104+ # We want to try and improve the comments in the k6 codebase, so individual
105+ # non-golint items from the default exclusion list will gradually be added
106+ # to the rules below
107+ rules :
108+ # Exclude duplicate code and function length and complexity checking in test
109+ # files (due to common repeats and long functions in test code)
110+ - path : _(test|gen)\.go
111+ linters :
112+ - cyclop
113+ - dupl
114+ - gocognit
115+ - funlen
116+ - lll
117+ - linters :
118+ - staticcheck
119+ # Tracked in https://github.com/grafana/xk6-grpc/issues/14
120+ text : " The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated."
121+ - linters :
122+ - staticcheck
123+ # tracked in https://github.com/grafana/xk6-kubernetes/issues/135
124+ text : ' SA1019: corev1.EndpointSubset is deprecated'
125+ - linters :
126+ - staticcheck
127+ # tracked in https://github.com/grafana/xk6-kubernetes/issues/135
128+ text : ' SA1019: corev1.Endpoints is deprecated'
129+ - linters :
130+ - forbidigo
131+ text : ' use of `os\.(SyscallError|Signal|Interrupt)` forbidden'
0 commit comments