forked from openshift-kni/eco-goinfra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
127 lines (120 loc) · 2.55 KB
/
.golangci.yml
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
run:
timeout: 15m0s
skip-dirs-use-default: true
fast: false
# modules-download-mode: readonly
linters-settings:
revive:
rules:
- name: indent-error-flow
- name: var-naming
- name: increment-decrement
- name: exported
arguments:
- disableStutteringCheck
wsl:
strict-append: false
gofmt:
simplify: true
funlen:
lines: 90
statements: 40
unused:
check-exported: true
go: "1.19"
stylecheck:
# Select the Go version to target. The default is '1.13'.
go: "1.19"
# https://staticcheck.io/docs/options#checks
checks:
- all
- ST1001
linters:
disable:
- structcheck
enable:
- asciicheck
- bidichk
- depguard
- durationcheck
- errcheck
- errname
- errorlint
- exhaustive
- forcetypeassert
- funlen
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- godox
- gofmt
- goheader
- goimports
- gomodguard
- goprintffuncname
- gosimple
- govet
- importas
- ineffassign
- ireturn
- lll
- makezero
- misspell
- nakedret
- nilnil
- nolintlint
- predeclared
- promlinter
- revive
- staticcheck
- stylecheck
- tenv
- thelper
- typecheck
- unconvert
- unparam
- unused
- varnamelen
- wsl
- nlreturn
output:
format: colored-line-number
issues:
exclude:
- "can't run linter goanalysis_metalinter: inspect: failed to load"
max-issues-per-linter: 0
max-same-issues: 0
new: false
include:
- EXC0002 # disable excluding of issues about comments from golint
- EXC0012 # EXC0012 revive: Annoying issue about not having a comment. The rare codebase has such comments
- EXC0014 # EXC0014 revive: Annoying issue about not having a comment. The rare codebase has such comments
exclude-rules:
#- # Exclude some linters from running on tests files.
- path: 'tests/internal/inittools'
linters:
- gochecknoinits
- path: 'tests/cnf/core/network/internal/netinittools'
linters:
- gochecknoinits
- path: 'tests/assisted/ztp/internal/ztpinittools'
linters:
- gochecknoinits
- path: 'tests/internal/polarion'
linters:
- exhaustive
- path: 'tests/internal/polarion'
linters:
- depguard
- path: 'tests/internal/reporter'
linters:
- depguard
- path: "tests/.*/tests/.*"
linters:
- depguard
- path: "tests/.*/.*suite_test.go"
linters:
- depguard