-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy path.golangci.yml
More file actions
144 lines (144 loc) · 3.15 KB
/
.golangci.yml
File metadata and controls
144 lines (144 loc) · 3.15 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
version: "2"
run:
go: "1.26"
issues-exit-code: 1
tests: true
output:
formats:
text:
path: stdout
print-linter-name: true
print-issued-lines: true
linters:
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- contextcheck
- dupl
- durationcheck
- errchkjson
- errorlint
- exhaustive
- fatcontext
- gocheckcompilerdirectives
- gochecksumtype
- goconst
- gocritic
- gosmopolitan
- lll
- loggercheck
- makezero
- misspell
- mnd
- musttag
- nilerr
- nilnesserr
- noctx
- paralleltest
- perfsprint
- prealloc
- protogetter
- reassign
- rowserrcheck
- spancheck
- sqlclosecheck
- staticcheck
- testableexamples
- testifylint
- testpackage
- thelper
- tparallel
- unconvert
- unparam
- usetesting
- wastedassign
- wsl_v5
- zerologlint
settings:
dupl:
threshold: 120
errcheck:
check-type-assertions: false
check-blank: false
exclude-functions:
- (*os.File).Close
errorlint:
errorf: true
asserts: true
comparison: true
goconst:
min-len: 3
min-occurrences: 5
gocritic:
enabled-tags:
- performance
disabled-tags:
- experimental
govet:
enable:
- fieldalignment
- printf
- unusedwrite
nakedret:
max-func-lines: 20
staticcheck:
checks:
- all
- -SA9005
- -QF1008
- -ST1001
unparam:
check-exported: false
wsl_v5:
allow-whole-block: false
branch-max-lines: 2
exclusions:
generated: lax
rules:
- linters:
- dupl
- errcheck
- gocyclo
- mnd
- unparam
- wsl
path: _test\.go
# We end up with duplicated content in this package to save us from duplicating code in other packages.
- linters:
- dupl
path: cli/flags/shared
# Incrementally linting lines that are too long to ensure that
# we don't have conflicts on every file in the codebase while
# trying to get this merged in.
- linters:
- lll
path-except: '^(internal/awshelper/|internal/cas/|internal/cli/commands/(backend/(delete|migrate)|catalog/tui/command|exec|find|help|list|stack)/|internal/cloner/|internal/configbridge/|internal/engine/|internal/errorconfig/|internal/errors/|internal/experiment/|internal/gcphelper/|internal/git/|internal/prepare/|internal/runner/(common|graph|run/creds/providers/(amazonsts|externalcmd))/|internal/stacks/(generate|output)/|internal/tf/cache/(controllers|middleware)/|internal/tips/|internal/vfs/|pkg/log/(format/placeholders|writer)/)'
paths:
- docs
- _ci
- .github
- .circleci
- third_party$
- builtin$
- examples$
issues:
max-issues-per-linter: 0
max-same-issues: 0
formatters:
enable:
- goimports
settings:
gofmt:
simplify: true
exclusions:
generated: lax
paths:
- docs
- _ci
- .github
- .circleci
- third_party$
- builtin$
- examples$