-
Notifications
You must be signed in to change notification settings - Fork 629
Expand file tree
/
Copy path.golangci.yaml
More file actions
68 lines (68 loc) · 2.01 KB
/
.golangci.yaml
File metadata and controls
68 lines (68 loc) · 2.01 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
version: "2"
run:
build-tags:
- e2e
- probe
- preupgrade
- postupgrade
- postdowngrade
linters:
enable:
- asciicheck
- gosec
- misspell
- prealloc
- unconvert
- unparam
disable:
- errcheck
settings:
staticcheck:
checks:
- all
- '-SA1019' # Temporary ignore SA1019: use of deprecated types or methods
- '-ST1003' # Temporary ignore ST1003: We have a lot of "Api" where it should be "API"
- '-ST1005' # Temporary ignore ST1005: error strings should not be capitalized
- '-ST1016' # Temporary ignore ST1016: methods on the same type should have the same receiver name
- '-ST1019' # Temporary ignore ST1019: multiple imports of a module with different names
- '-QF1002' # Temporary ignore QF1002: could use tagged switch
- '-QF1003' # Temporary ignore QF1003: Convert if/else-if chain to tagged switch
- '-QF1007' # Temporary ignore QF1007: merge conditional assignment into variable declaration
- '-QF1008' # Temporary ignore QF1008: Omit embedded fields from selector expression
- '-QF1009' # Temporary ignore QF1009: Merge conditional assignment into variable declaration
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- gosec
- unparam
path: test
- linters:
- staticcheck
text: "ST1003" # A lot of "Api" instead of "API" names
path: pkg/reconciler/testing/v1/apiserversource.go
- linters:
- staticcheck
text: "ST1001" # Prohibit dot imports
path: test/e2e/helpers/.*_helper.go
- linters:
- staticcheck
text: "ST1001" # Prohibit dot imports
path: test/rekt/features/.*.go
paths:
- pkg/client
- third_party/
- builtin$
- examples$
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$