-
Notifications
You must be signed in to change notification settings - Fork 122
Expand file tree
/
Copy path.golangci.yaml
More file actions
69 lines (69 loc) · 1.9 KB
/
Copy path.golangci.yaml
File metadata and controls
69 lines (69 loc) · 1.9 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
version: "2"
run:
concurrency: 4
timeout: 10m
linters:
enable:
- loggercheck
- revive
disable:
- unused
settings:
govet:
enable-all: true
loggercheck:
logr: true
zap: true
no-printf-like: true
revive:
rules:
- name: duplicated-imports
- name: unused-parameter
- name: unreachable-code
- name: context-as-argument
- name: early-return
- name: exported
exclusions:
generated: lax
rules:
- linters:
- staticcheck
text: 'SA1019:'
# errcheck: Almost all programs ignore errors on these functions and in most cases it's ok
- path: (.+)\.go$
text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked
# revive
- path: (.+)\.go$
text: var-naming
- path: (.+)\.go$
text: dot-imports
- path: (.+)\.go$
text: package-comments
- path: (.+)\.go$
text: unexported-return
- path: (.+)\.go$
text: indent-error-flow
- path: (.+)\.go$
text: 'exported: (type|func) name will be used as .* by other packages, and that stutters;'
# typecheck
- path: (.+)\.go$
text: 'undeclared name: `.*`'
- path: (.+)\.go$
text: '".*" imported but not used'
# allow non-capitalized messages if they start with technical terms
- path: (.+)\.go$
text: 'structured logging message should be capitalized: "garden(er-apiserver|er-controller-manager|er-admission-controller|er-operator|er-resource-manager|let)'
- path: (.+)\.go$
text: declaration of "(err|ctx)" shadows declaration at
paths:
- vendor
- third_party$
- builtin$
- examples$
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$