@marcel91200 / caddy Mirror · read-only
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 10, 22:30 UTC

master
yml 131 lines 3.26 KB
Raw
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 - canonicalheader
23 - decorder
24 - dogsled
25 - dupl
26 - dupword
27 - durationcheck
28 - errcheck
29 - errname
30 - exhaustive
31 - gosec
32 - govet
33 - importas
34 - ineffassign
35 - misspell
36 - modernize
37 - prealloc
38 - promlinter
39 - sloglint
40 - sqlclosecheck
41 - staticcheck
42 - testableexamples
43 - testifylint
44 - tparallel
45 - unconvert
46 - unused
47 - wastedassign
48 - whitespace
49 - zerologlint
50 settings:
51 canonicalheader:
52 # Match net/http's canonical MIME map keys to avoid re-canonicalisation.
53 exclusions:
54 - Etag
55 - Te
56 - Www-Authenticate
57 staticcheck:
58 checks: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-QF1006", "-QF1008"] # default, and exclude 1 more undesired check
59 errcheck:
60 exclude-functions:
61 - fmt.*
62 - (go.uber.org/zap/zapcore.ObjectEncoder).AddObject
63 - (go.uber.org/zap/zapcore.ObjectEncoder).AddArray
64 exclusions:
65 generated: lax
66 presets:
67 - comments
68 - common-false-positives
69 - legacy
70 - std-error-handling
71 rules:
72 - linters:
73 - gosec
74 text: G115 # TODO: Either we should fix the issues or nuke the linter if it's bad
75 - linters:
76 - gosec
77 text: G107 # we aren't calling unknown URL
78 - linters:
79 - gosec
80 text: G203 # as a web server that's expected to handle any template, this is totally in the hands of the user.
81 - linters:
82 - gosec
83 text: G204 # we're shelling out to known commands, not relying on user-defined input.
84 - linters:
85 - gosec
86 # the choice of weakrand is deliberate, hence the named import "weakrand"
87 path: modules/caddyhttp/reverseproxy/selectionpolicies.go
88 text: G404
89 - linters:
90 - gosec
91 path: modules/caddyhttp/reverseproxy/streaming.go
92 text: G404
93 - linters:
94 - dupl
95 path: modules/logging/filters.go
96 - linters:
97 - dupl
98 path: modules/caddyhttp/matchers.go
99 - linters:
100 - dupl
101 path: modules/caddyhttp/vars.go
102 - linters:
103 - errcheck
104 path: _test\.go
105 - linters:
106 - canonicalheader
107 path: _test\.go
108 paths:
109 - third_party$
110 - builtin$
111 - examples$
112 formatters:
113 enable:
114 - gci
115 - gofmt
116 - gofumpt
117 - goimports
118 settings:
119 gci:
120 sections:
121 - standard # Standard section: captures all standard packages.
122 - default # Default section: contains all imports that could not be matched to another section type.
123 - prefix(github.com/caddyserver/caddy/v2/cmd) # ensure that this is always at the top and always has a line break.
124 - prefix(github.com/caddyserver/caddy) # Custom section: groups all imports with the specified Prefix.
125 custom-order: true
126 exclusions:
127 generated: lax
128 paths:
129 - third_party$
130 - builtin$
131 - examples$