Skip to content

Commit d27e172

Browse files
committed
golangci-lint: reorder settings to try to have nicer diff
1 parent 41b4984 commit d27e172

File tree

1 file changed

+69
-68
lines changed

1 file changed

+69
-68
lines changed

.golangci.yml

Lines changed: 69 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,5 @@
11
# v1.64.6
22
# Please don't remove the first line. It uses in CI to determine the golangci version
3-
run:
4-
timeout: 5m
5-
6-
issues:
7-
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
8-
max-issues-per-linter: 0
9-
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
10-
max-same-issues: 0
11-
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-
- canonicalheader
23-
- cyclop
24-
- dupl
25-
- gocognit
26-
- funlen
27-
- lll
28-
- forcetypeassert
29-
- path: js\/modules\/k6\/browser\/.*\.go
30-
linters:
31-
- revive
32-
- contextcheck
33-
- path: js\/modules\/k6\/html\/.*\.go
34-
text: "exported: exported "
35-
linters:
36-
- revive
37-
- path: js\/modules\/k6\/http\/.*_test\.go
38-
linters:
39-
# k6/http module's tests are quite complex because they often have several nested levels.
40-
# The module is in maintenance mode, so we don't intend to port the tests to a parallel version.
41-
- paralleltest
42-
- tparallel
43-
- linters:
44-
- forbidigo
45-
text: 'use of `os\.(SyscallError|Signal|Interrupt)` forbidden'
46-
47-
linters-settings:
48-
exhaustive:
49-
default-signifies-exhaustive: true
50-
cyclop:
51-
max-complexity: 25
52-
dupl:
53-
threshold: 150
54-
goconst:
55-
min-len: 10
56-
min-occurrences: 4
57-
funlen:
58-
lines: 80
59-
statements: 60
60-
forbidigo:
61-
forbid:
62-
- '^(fmt\\.Print(|f|ln)|print|println)$'
63-
# Forbid everything in os, except os.Signal and os.SyscalError
64-
- '^os\.(.*)$(# Using anything except Signal and SyscallError from the os package is forbidden )?'
65-
# Forbid everything in syscall except the uppercase constants
66-
- '^syscall\.[^A-Z_]+$(# Using anything except constants from the syscall package is forbidden )?'
67-
- '^logrus\.Logger$'
68-
usetesting:
69-
os-setenv: true
70-
713
linters:
724
disable-all: true
735
enable:
@@ -136,3 +68,72 @@ linters:
13668
- wastedassign
13769
- whitespace
13870
fast: false
71+
72+
run:
73+
timeout: 5m
74+
75+
issues:
76+
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
77+
max-issues-per-linter: 0
78+
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
79+
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+

0 commit comments

Comments
 (0)