Debian Codegraph @

.golangci.yml

raw symbols SCIP
1 version: "2"
2 run:
3 issues-exit-code: 1
4 tests: false
5 build-tags:
6 - nobadger
7 - nomysql
8 - nopgx
9 output:
10 formats:
11 text:
12 path: stdout
13 print-linter-name: true
14 print-issued-lines: true
15 linters:
16 default: none
17 enable:
18 - asasalint
19 - asciicheck
20 - bidichk
21 - bodyclose
22 - decorder
23 - dogsled
24 - dupl
25 - dupword
26 - durationcheck
27 - errcheck
28 - errname
29 - exhaustive
30 - gosec
31 - govet
32 - importas
33 - ineffassign
34 - misspell
35 - modernize
36 - prealloc
37 - promlinter
38 - sloglint
39 - sqlclosecheck
40 - staticcheck
41 - testableexamples
42 - testifylint
43 - tparallel
44 - unconvert
45 - unused
46 - wastedassign
47 - whitespace
48 - zerologlint
49 settings:
50 staticcheck:
51 checks: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-QF1006", "-QF1008"] # default, and exclude 1 more undesired check
52 errcheck:
53 exclude-functions:
54 - fmt.*
55 - (go.uber.org/zap/zapcore.ObjectEncoder).AddObject
56 - (go.uber.org/zap/zapcore.ObjectEncoder).AddArray
57 exhaustive:
58 ignore-enum-types: reflect.Kind|svc.Cmd
59 exclusions:
60 generated: lax
61 presets:
62 - comments
63 - common-false-positives
64 - legacy
65 - std-error-handling
66 rules:
67 - linters:
68 - gosec
69 text: G115 # TODO: Either we should fix the issues or nuke the linter if it's bad
70 - linters:
71 - gosec
72 text: G107 # we aren't calling unknown URL
73 - linters:
74 - gosec
75 text: G203 # as a web server that's expected to handle any template, this is totally in the hands of the user.
76 - linters:
77 - gosec
78 text: G204 # we're shelling out to known commands, not relying on user-defined input.
79 - linters:
80 - gosec
81 # the choice of weakrand is deliberate, hence the named import "weakrand"
82 path: modules/caddyhttp/reverseproxy/selectionpolicies.go
83 text: G404
84 - linters:
85 - gosec
86 path: modules/caddyhttp/reverseproxy/streaming.go
87 text: G404
88 - linters:
89 - dupl
90 path: modules/logging/filters.go
91 - linters:
92 - dupl
93 path: modules/caddyhttp/matchers.go
94 - linters:
95 - dupl
96 path: modules/caddyhttp/vars.go
97 - linters:
98 - errcheck
99 path: _test\.go
100 paths:
101 - third_party$
102 - builtin$
103 - examples$
104 formatters:
105 enable:
106 - gci
107 - gofmt
108 - gofumpt
109 - goimports
110 settings:
111 gci:
112 sections:
113 - standard # Standard section: captures all standard packages.
114 - default # Default section: contains all imports that could not be matched to another section type.
115 - prefix(github.com/caddyserver/caddy/v2/cmd) # ensure that this is always at the top and always has a line break.
116 - prefix(github.com/caddyserver/caddy) # Custom section: groups all imports with the specified Prefix.
117 custom-order: true
118 exclusions:
119 generated: lax
120 paths:
121 - third_party$
122 - builtin$
123 - examples$