Debian Codegraph @

.golangci.yml

raw symbols SCIP
1 run:
2 # The default runtime timeout is 1m, which doesn't work well on Github Actions.
3 timeout: 4m
4
5 # NOTE: This file is populated by the lint-install tool. Local adjustments may be overwritten.
6 linters-settings:
7 cyclop:
8 # NOTE: This is a very high transitional threshold
9 max-complexity: 37
10 package-average: 34.0
11 skip-tests: true
12
13 gocognit:
14 # NOTE: This is a very high transitional threshold
15 min-complexity: 98
16
17 dupl:
18 threshold: 200
19
20 goconst:
21 min-len: 4
22 min-occurrences: 5
23 ignore-tests: true
24
25 gosec:
26 excludes:
27 - G107 # Potential HTTP request made with variable url
28 - G204 # Subprocess launched with function call as argument or cmd arguments
29 - G404 # Use of weak random number generator (math/rand instead of crypto/rand
30
31 errorlint:
32 # these are still common in Go: for instance, exit errors.
33 asserts: false
34
35 exhaustive:
36 default-signifies-exhaustive: true
37
38 nestif:
39 min-complexity: 8
40
41 nolintlint:
42 require-explanation: true
43 allow-unused: false
44 require-specific: true
45
46 revive:
47 ignore-generated-header: true
48 severity: warning
49 rules:
50 - name: atomic
51 - name: blank-imports
52 - name: bool-literal-in-expr
53 - name: confusing-naming
54 - name: constant-logical-expr
55 - name: context-as-argument
56 - name: context-keys-type
57 - name: deep-exit
58 - name: defer
59 - name: range-val-in-closure
60 - name: range-val-address
61 - name: dot-imports
62 - name: error-naming
63 - name: error-return
64 - name: error-strings
65 - name: errorf
66 - name: exported
67 - name: identical-branches
68 - name: if-return
69 - name: import-shadowing
70 - name: increment-decrement
71 - name: indent-error-flow
72 - name: indent-error-flow
73 - name: package-comments
74 - name: range
75 - name: receiver-naming
76 - name: redefines-builtin-id
77 - name: superfluous-else
78 - name: struct-tag
79 - name: time-naming
80 - name: unexported-naming
81 - name: unexported-return
82 - name: unnecessary-stmt
83 - name: unreachable-code
84 - name: unused-parameter
85 - name: var-declaration
86 - name: var-naming
87 - name: unconditional-recursion
88 - name: waitgroup-by-value
89
90 staticcheck:
91 go: "1.16"
92
93 unused:
94 go: "1.16"
95
96 output:
97 sort-results: true
98
99 linters:
100 disable-all: true
101 enable:
102 - asciicheck
103 - bodyclose
104 - cyclop
105 - deadcode
106 - dogsled
107 - dupl
108 - durationcheck
109 - errcheck
110 - errname
111 - errorlint
112 - exhaustive
113 - exportloopref
114 - forcetypeassert
115 - gocognit
116 - goconst
117 - gocritic
118 - godot
119 - gofmt
120 - gofumpt
121 - gosec
122 - goheader
123 - goimports
124 - goprintffuncname
125 - gosimple
126 - govet
127 - ifshort
128 - importas
129 - ineffassign
130 - makezero
131 - misspell
132 - nakedret
133 - nestif
134 - nilerr
135 - noctx
136 - nolintlint
137 - predeclared
138 # disabling for the initial iteration of the linting tool
139 # - promlinter
140 - revive
141 - rowserrcheck
142 - sqlclosecheck
143 - staticcheck
144 - structcheck
145 - stylecheck
146 - thelper
147 - tparallel
148 - typecheck
149 - unconvert
150 - unparam
151 - unused
152 - varcheck
153 - wastedassign
154 - whitespace
155
156 # Disabled linters, due to being misaligned with Go practices
157 # - exhaustivestruct
158 # - gochecknoglobals
159 # - gochecknoinits
160 # - goconst
161 # - godox
162 # - goerr113
163 # - gomnd
164 # - lll
165 # - nlreturn
166 # - testpackage
167 # - wsl
168 # Disabled linters, due to not being relevant to our code base:
169 # - maligned
170 # - prealloc "For most programs usage of prealloc will be a premature optimization."
171 # Disabled linters due to bad error messages or bugs
172 # - tagliatelle
173
174 issues:
175 # Excluding configuration per-path, per-linter, per-text and per-source
176 exclude-rules:
177 - path: _test\.go
178 linters:
179 - dupl
180 - errcheck
181 - forcetypeassert
182 - gocyclo
183 - gosec
184 - noctx
185
186 - path: .*cmd.*
187 linters:
188 - noctx
189
190 - path: main\.go
191 linters:
192 - noctx
193
194 - path: .*cmd.*
195 text: "deep-exit"
196
197 - path: main\.go
198 text: "deep-exit"
199
200 # This check is of questionable value
201 - linters:
202 - tparallel
203 text: "call t.Parallel on the top level as well as its subtests"
204
205 # Don't hide lint issues just because there are many of them
206 max-same-issues: 0
207 max-issues-per-linter: 0