-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yaml
118 lines (115 loc) · 2.89 KB
/
.golangci.yaml
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
run:
go: "1.23"
timeout: 10m
tests: false
allow-parallel-runners: true
issues-exit-code: 2
linters:
enable-all: true
disable:
- bodyclose
- containedctx # Struct should not contain context, action does.
- contextcheck
- cyclop # Complex functions are not good.
- depguard
- dogsled
- dupl # Check code duplications.
- execinquery
- exhaustive # Doesn't really make sense.
- exhaustruct # Doesn't really make sense.
- exportloopref
- forcetypeassert # Priority: that can lead to serious crashes.
- funlen # Break long functions.
- gci
- gochecknoglobals
- gochecknoinits # Init functions cause an import to have side effects,
- gomoddirectives
- err113
- goimports # acts weirdly, dci handles imports anyway
- gomnd # Give constant values a name with constants.
- interfacebloat
- ireturn # Accept interface, return concrate.
- lll
- loggercheck # Doesn't really make sense.
- nestif # Some nexted if statements are 8 or 9 deep.
- nilnil # A function should return either something valuable
- nonamedreturns # Either named return, or use simply `return`.
- paralleltest
- rowserrcheck
- sqlclosecheck
- tagliatelle
- testpackage # Blackbox testing is preffered.
- unparam
- varnamelen # m, d, p < These are not so meaningful variables.
- wastedassign
- wrapcheck
- wsl
linters-settings:
gci:
sections:
- standard
- blank
- dot
- default
- prefix(github.com/open-component-model/ocm)
custom-order: true
funlen:
lines: 110
statements: 60
cyclop:
max-complexity: 46
skip-tests: true
gocognit:
# Minimal code complexity to report.
# Default: 30 (but we recommend 10-20)
min-complexity: 46
nolintlint:
allow-unused: false
require-explanation: true
require-specific: false
varnamelen:
ignore-names:
- err
- wg
- id
lll:
line-length: 120
gosec:
exclude-generated: true
issues:
exclude:
- composites
exclude-rules:
- path: cmds/
linters:
- forbidigo
- source: "https://"
linters:
- lll
- text: "shadow: declaration of \"err\""
linters:
- govet
- text: "shadow: declaration of \"ok\""
linters:
- govet
- path: _test\.go
linters:
- gocyclo
- errcheck
- gosec
- dupl
- funlen
- scopelint
- text: "Spec.DeepCopyInto undefined"
linters:
- typecheck
- text: "G601: Implicit memory aliasing in for loop"
# Ignored cos why not, that was the request.
linters:
- gosec
- source: "// .* #\\d+"
linters:
- godox
- path: ignore/.*\.go
linters:
- dupword