Skip to content

Commit 4a75423

Browse files
committed
Create .golangci-lint-v2.yaml
1 parent ae49b02 commit 4a75423

File tree

2 files changed

+301
-121
lines changed

2 files changed

+301
-121
lines changed

.golangci-lint-v2.yaml

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
version: "2"
2+
run:
3+
go: "1.24"
4+
modules-download-mode: vendor
5+
allow-parallel-runners: true
6+
linters:
7+
enable:
8+
- asciicheck
9+
- containedctx
10+
- copyloopvar
11+
- decorder
12+
- dogsled
13+
- errorlint
14+
- goconst
15+
- gocritic
16+
- gocyclo
17+
- godot
18+
- gosec
19+
- importas
20+
- misspell
21+
- nakedret
22+
- prealloc
23+
- predeclared
24+
- revive
25+
- staticcheck
26+
- thelper
27+
- unconvert
28+
- whitespace
29+
settings:
30+
errcheck:
31+
disable-default-exclusions: true
32+
check-type-assertions: false
33+
check-blank: true
34+
exclude-functions:
35+
- io/ioutil.ReadFile
36+
- io.Copy(*bytes.Buffer)
37+
- io.Copy(os.Stdout)
38+
errorlint:
39+
errorf: true
40+
asserts: true
41+
comparison: true
42+
gosec:
43+
excludes:
44+
- G115
45+
staticcheck:
46+
checks:
47+
# Default
48+
- all
49+
# Disable check for one at least one comment in a package
50+
- -ST1000
51+
# Disable quickfix checks
52+
- -QF1001
53+
- -QF1008
54+
revive:
55+
rules:
56+
- name: blank-imports
57+
- name: context-as-argument
58+
- name: context-keys-type
59+
- name: dot-imports
60+
- name: error-return
61+
- name: error-strings
62+
- name: error-naming
63+
- name: exported
64+
- name: if-return
65+
- name: increment-decrement
66+
- name: var-naming
67+
- name: var-declaration
68+
- name: range
69+
- name: receiver-naming
70+
- name: time-naming
71+
- name: unexported-return
72+
- name: indent-error-flow
73+
- name: errorf
74+
- name: superfluous-else
75+
- name: unreachable-code
76+
- name: redefines-builtin-id
77+
- name: bool-literal-in-expr
78+
- name: constant-logical-expr
79+
exclusions:
80+
generated: lax
81+
presets:
82+
- common-false-positives
83+
- legacy
84+
- std-error-handling
85+
rules:
86+
- linters:
87+
- goconst
88+
path: _test\.go
89+
paths:
90+
- ^bin
91+
- ^cluster-api
92+
- ^data/data
93+
- ^docs
94+
- ^hack
95+
- ^images
96+
- ^scripts
97+
- ^terraform
98+
- ^upi
99+
- ^pkg/asset/manifests/azure/stack/v1beta1
100+
- third_party$
101+
- builtin$
102+
- examples$
103+
issues:
104+
uniq-by-line: false
105+
formatters:
106+
enable:
107+
- gofmt
108+
- goimports
109+
settings:
110+
gci:
111+
sections:
112+
- standard
113+
- default
114+
- prefix(github.com/openshift)
115+
- blank
116+
custom-order: true
117+
gofumpt:
118+
module-path: github.com/openshift/installer
119+
extra-rules: true
120+
goimports:
121+
local-prefixes:
122+
- github.com/openshift
123+
exclusions:
124+
generated: lax
125+
paths:
126+
- ^bin
127+
- ^cluster-api
128+
- ^data/data
129+
- ^docs
130+
- ^hack
131+
- ^images
132+
- ^scripts
133+
- ^terraform
134+
- ^upi
135+
- ^pkg/asset/manifests/azure/stack/v1beta1
136+
- third_party$
137+
- builtin$
138+
- examples$

0 commit comments

Comments
 (0)