-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy path.golangci-lint-v2.yaml
More file actions
142 lines (142 loc) · 2.74 KB
/
.golangci-lint-v2.yaml
File metadata and controls
142 lines (142 loc) · 2.74 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
version: "2"
run:
go: "1.25"
modules-download-mode: vendor
allow-parallel-runners: true
linters:
enable:
- asciicheck
- containedctx
- copyloopvar
- decorder
- dogsled
- errorlint
- goconst
- gocritic
- gocyclo
- godot
- gosec
- importas
- misspell
- nakedret
- predeclared
- revive
- staticcheck
- thelper
- unconvert
- whitespace
settings:
errcheck:
disable-default-exclusions: true
check-type-assertions: false
check-blank: true
exclude-functions:
- io/ioutil.ReadFile
- io.Copy(*bytes.Buffer)
- io.Copy(os.Stdout)
errorlint:
errorf: true
asserts: true
comparison: true
gosec:
excludes:
- G115
gocyclo:
min-complexity: 45
staticcheck:
checks:
# Default
- all
# Disable check for one at least one comment in a package
- -ST1000
# Disable quickfix checks
- -QF1001
- -QF1008
revive:
rules:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
- name: if-return
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
- name: superfluous-else
- name: unreachable-code
- name: redefines-builtin-id
- name: bool-literal-in-expr
- name: constant-logical-expr
exclusions:
generated: lax
presets:
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- goconst
path: _test\.go
- linters:
- revive
text: "var-naming: avoid meaningless package names"
paths:
- ^bin
- ^cluster-api
- ^data/data
- ^docs
- ^hack
- ^images
- ^scripts
- ^terraform
- ^upi
- ^pkg/asset/manifests/azure/stack/v1beta1
- third_party$
- builtin$
- examples$
issues:
uniq-by-line: false
formatters:
enable:
- gofmt
- goimports
settings:
gci:
sections:
- standard
- default
- prefix(github.com/openshift)
- blank
custom-order: true
gofumpt:
module-path: github.com/openshift/installer
extra-rules: true
goimports:
local-prefixes:
- github.com/openshift
exclusions:
generated: lax
paths:
- ^bin
- ^cluster-api
- ^data/data
- ^docs
- ^hack
- ^images
- ^scripts
- ^terraform
- ^upi
- ^pkg/asset/manifests/azure/stack/v1beta1
- third_party$
- builtin$
- examples$