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).
This commit is contained in:
parent
8656ab6183
commit
f602004cd4
|
|
@ -0,0 +1,26 @@
|
||||||
|
# This file configures checks that all new code for Kubernetes is meant to
|
||||||
|
# pass, in contrast to .golangci.yaml which defines checks that also the
|
||||||
|
# existing code passes.
|
||||||
|
|
||||||
|
run:
|
||||||
|
timeout: 30m
|
||||||
|
|
||||||
|
linters:
|
||||||
|
disable-all: false
|
||||||
|
enable: # please keep this alphabetized
|
||||||
|
- ginkgolinter
|
||||||
|
- gocritic
|
||||||
|
- govet
|
||||||
|
- ineffassign
|
||||||
|
# Should we add logcheck, for consistency with kubernetes/kubernetes?
|
||||||
|
# - logcheck
|
||||||
|
- staticcheck
|
||||||
|
- stylecheck
|
||||||
|
- unused
|
||||||
|
|
||||||
|
linters-settings: # please keep this alphabetized
|
||||||
|
gocritic:
|
||||||
|
staticcheck:
|
||||||
|
checks:
|
||||||
|
- "all"
|
||||||
|
stylecheck:
|
||||||
Loading…
Reference in New Issue