Skip to content

Commit f602004

Browse files
justinsbthockin
authored andcommitted
lint: Add golangci based on kubernetes/kubernetes.
Adapted the "strict" settings, but removed a few exclusions that aren't relevant here (e.g. zz_generated), and removed the custom logcheck linter (as we aren't currently using structured logging).
1 parent 8656ab6 commit f602004

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.golangci.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This file configures checks that all new code for Kubernetes is meant to
2+
# pass, in contrast to .golangci.yaml which defines checks that also the
3+
# existing code passes.
4+
5+
run:
6+
timeout: 30m
7+
8+
linters:
9+
disable-all: false
10+
enable: # please keep this alphabetized
11+
- ginkgolinter
12+
- gocritic
13+
- govet
14+
- ineffassign
15+
# Should we add logcheck, for consistency with kubernetes/kubernetes?
16+
# - logcheck
17+
- staticcheck
18+
- stylecheck
19+
- unused
20+
21+
linters-settings: # please keep this alphabetized
22+
gocritic:
23+
staticcheck:
24+
checks:
25+
- "all"
26+
stylecheck:

0 commit comments

Comments
 (0)