-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Expand file tree
/
Copy path.golangci.yaml
More file actions
83 lines (83 loc) · 1.74 KB
/
Copy path.golangci.yaml
File metadata and controls
83 lines (83 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
version: "2"
run:
go: "1.27"
linters:
default: none
enable:
- gocritic
- gosec
- misspell
settings:
gocritic:
# Keep gocritic focused on correctness checks for the initial adoption.
# These checks are mostly style churn in the existing codebase.
disabled-checks:
- appendAssign
- assignOp
- captLocal
- commentFormatting
- deprecatedComment
- elseif
- ifElseChain
- singleCaseSwitch
- sloppyLen
gosec:
# Keep the initial gosec adoption to high-signal checks. The broader
# default set reports many legacy taint, weak hash, math/rand, and
# integer conversion findings that need separate audits.
includes:
- G101
- G103
- G104
- G106
- G108
- G109
- G110
- G111
- G201
- G202
- G203
- G301
- G302
- G303
- G304
- G305
- G306
- G307
- G403
- G502
- G503
- G504
- G601
- G602
misspell:
mode: default
# Leave locale unset so both US and UK English spellings are accepted.
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- gosec
# Test fixtures intentionally contain fake keys and tokens.
path: _test\.go$
text: "G101:"
paths:
- ^zz_generated.*
- third_party$
- builtin$
- examples$
issues:
max-issues-per-linter: 10000
max-same-issues: 10000
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$