Skip to content

Commit

Permalink
lint: Add golangci based on kubernetes/kubernetes.
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
justinsb authored and thockin committed Jul 29, 2023
1 parent 8656ab6 commit f602004
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -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:

0 comments on commit f602004

Please sign in to comment.