File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -15,23 +15,36 @@ linters-settings:
15
15
govet :
16
16
# Don't report about shadowed variables
17
17
check-shadowing : false
18
+
18
19
gofmt :
19
20
# simplify code: gofmt with `-s` option, true by default
20
21
simplify : true
22
+
21
23
funlen :
22
24
# Checks the number of lines in a function.
23
25
# If lower than 0, disable the check.
24
26
lines : 200
25
27
# Checks the number of statements in a function.
26
28
statements : 80
29
+
27
30
gosec :
28
31
excludes :
29
32
- G402 # Look for bad TLS connection settings.
30
33
- G306 # Poor file permissions used when writing to a new file.
31
34
35
+ whitespace :
36
+ multi-func : true
37
+ multi-if : true
38
+
32
39
linters :
33
40
enable-all : true
34
41
disable :
42
+ # Allow dynamic errors.
43
+ - goerr113
44
+
45
+ # We want to allow short variable names.
46
+ - varnamelen
47
+
35
48
# Init functions are used by loggers throughout the codebase.
36
49
- gochecknoinits
37
50
@@ -46,6 +59,17 @@ linters:
46
59
# instances are created.
47
60
- exhaustruct
48
61
62
+ # Disable gofumpt as it has weird behavior regarding formatting multiple
63
+ # lines for a function which is in conflict with our contribution
64
+ # guidelines. See https://github.com/mvdan/gofumpt/issues/235.
65
+ - gofumpt
66
+
67
+ # Disable whitespace linter as it has conflict rules against our
68
+ # contribution guidelines. See https://github.com/bombsimon/wsl/issues/109.
69
+ #
70
+ # TODO: bring it back when the above issue is fixed.
71
+ - wsl
72
+
49
73
# Deprecated linters. See https://golangci-lint.run/usage/linters/.
50
74
- interfacer
51
75
- golint
You can’t perform that action at this time.
0 commit comments