Skip to content

Commit 9e8cee9

Browse files
committed
Update the golangci config
Signed-off-by: Caleb Brown <[email protected]>
1 parent 1aa444f commit 9e8cee9

File tree

1 file changed

+80
-75
lines changed

1 file changed

+80
-75
lines changed

.golangci.yml

+80-75
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2+
version: "2"
23
run:
34
concurrency: 6
4-
deadline: 5m
5+
timeout: 5m
56
issues:
67
# Maximum issues count per one linter.
78
# Set to 0 to disable.
@@ -14,17 +15,26 @@ issues:
1415
# Exclude previously existing issues from the report
1516
new: true
1617
new-from-rev: HEAD
18+
19+
formatters:
20+
settings:
21+
gci:
22+
sections:
23+
- standard
24+
- default
25+
- prefix(github.com/ossf/criticality_score)
26+
1727
linters:
18-
disable-all: true
28+
default: none
1929
enable:
2030
- asciicheck
2131
#- bodyclose # Temporarily disabled.
2232
#- depguard # Temporarily disabled.
33+
- copyloopvar
2334
- dogsled
2435
#- errcheck # Temporarily disabled.
2536
- errorlint
2637
- exhaustive
27-
- exportloopref
2838
- gci
2939
#- gochecknoinits # Temporarily disabled.
3040
- gocognit
@@ -62,79 +72,74 @@ linters:
6272
- unused
6373
- whitespace
6474
- wrapcheck
65-
linters-settings:
66-
errcheck:
67-
check-type-assertions: true
68-
check-blank: true
69-
exhaustive:
70-
# https://golangci-lint.run/usage/linters/#exhaustive
71-
default-signifies-exhaustive: true
72-
godot:
73-
exclude:
74-
- "^ -- "
75-
govet:
76-
enable:
77-
- fieldalignment
78-
godox:
79-
keywords:
80-
- BUG
81-
- FIXME
82-
- HACK
83-
gci:
84-
sections:
85-
- standard
86-
- default
87-
- prefix(github.com/ossf/criticality_score)
88-
gocritic:
89-
enabled-checks:
90-
# Diagnostic
91-
- appendAssign
92-
- badCond
93-
- caseOrder
94-
- codegenComment
95-
- commentedOutCode
96-
- deprecatedComment
97-
- dupBranchBody
98-
- dupCase
99-
- dupSubExpr
100-
#- exitAfterDefer # Temporarily disabled
101-
- flagName
102-
- nilValReturn
103-
- weakCond
104-
- octalLiteral
75+
settings:
76+
errcheck:
77+
check-type-assertions: true
78+
check-blank: true
79+
exhaustive:
80+
# https://golangci-lint.run/usage/linters/#exhaustive
81+
default-signifies-exhaustive: true
82+
godot:
83+
exclude:
84+
- "^ -- "
85+
govet:
86+
enable:
87+
- fieldalignment
88+
godox:
89+
keywords:
90+
- BUG
91+
- FIXME
92+
- HACK
93+
gocritic:
94+
enabled-checks:
95+
# Diagnostic
96+
- appendAssign
97+
- badCond
98+
- caseOrder
99+
- codegenComment
100+
- commentedOutCode
101+
- deprecatedComment
102+
- dupBranchBody
103+
- dupCase
104+
- dupSubExpr
105+
#- exitAfterDefer # Temporarily disabled
106+
- flagName
107+
- nilValReturn
108+
- weakCond
109+
- octalLiteral
105110

106-
# Performance
107-
- appendCombine
108-
#- hugeParam # Crashing.
109-
- rangeExprCopy
110-
- rangeValCopy
111+
# Performance
112+
- appendCombine
113+
#- hugeParam # Crashing.
114+
- rangeExprCopy
115+
- rangeValCopy
111116

112-
# Style
113-
- boolExprSimplify
114-
- captLocal
115-
- commentFormatting
116-
- commentedOutImport
117-
- defaultCaseOrder
118-
- docStub
119-
- elseif
120-
- emptyFallthrough
121-
- hexLiteral
122-
- ifElseChain
123-
- methodExprCall
124-
- singleCaseSwitch
125-
- typeAssertChain
126-
- typeSwitchVar
127-
- underef
128-
- unlabelStmt
129-
- unlambda
117+
# Style
118+
- boolExprSimplify
119+
- captLocal
120+
- commentFormatting
121+
- commentedOutImport
122+
- defaultCaseOrder
123+
- docStub
124+
- elseif
125+
- emptyFallthrough
126+
- hexLiteral
127+
- ifElseChain
128+
- methodExprCall
129+
- singleCaseSwitch
130+
- typeAssertChain
131+
- typeSwitchVar
132+
- underef
133+
- unlabelStmt
134+
- unlambda
130135

131-
# Opinionated
132-
- builtinShadow
133-
- importShadow
134-
- initClause
135-
- nestingReduce
136-
- paramTypeCombine
137-
- ptrToRefParam
138-
- typeUnparen
139-
- unnecessaryBlock
136+
# Opinionated
137+
- builtinShadow
138+
- importShadow
139+
- initClause
140+
- nestingReduce
141+
- paramTypeCombine
142+
- ptrToRefParam
143+
- typeUnparen
144+
- unnecessaryBlock
140145

0 commit comments

Comments
 (0)