Skip to content

Modernize golangci-lint config - #35

Merged
tamalsaha merged 3 commits into
masterfrom
modernize-golangci-lint
Jul 13, 2026
Merged

Modernize golangci-lint config#35
tamalsaha merged 3 commits into
masterfrom
modernize-golangci-lint

Conversation

@tamalsaha

Copy link
Copy Markdown
Contributor
  • Add a .golangci.yml (v2) in place of inline golangci-lint flags in the
    Makefile lint target
  • Enable bodyclose and prealloc linters alongside unparam
  • Use linters.exclusions.paths for generated/client/vendor
  • Use gofumpt + goimports formatters (gofumpt is a stricter gofmt superset)
  • Apply resulting gofumpt formatting and simplify an embedded-field selector
    flagged by staticcheck (QF1008)

Signed-off-by: Tamal Saha tamal@appscode.com

- Add a .golangci.yml (v2) in place of inline golangci-lint flags in the
  Makefile lint target
- Enable bodyclose and prealloc linters alongside unparam
- Use linters.exclusions.paths for generated/client/vendor
- Use gofumpt + goimports formatters (gofumpt is a stricter gofmt superset)
- Apply resulting gofumpt formatting and simplify an embedded-field selector
  flagged by staticcheck (QF1008)

Signed-off-by: Tamal Saha <tamal@appscode.com>
Run `make gen fmt` to pick up the EnvVarSource fileKeyRef field from the
updated Kubernetes libraries. Fixes the verify-gen CI failure (generated
files out of date).

Signed-off-by: Tamal Saha <tamal@appscode.com>
The addon/v1alpha1 package was imported both normally and as a blank
import; the normal import already runs its init, so drop the redundant
blank import (staticcheck ST1019).

Signed-off-by: Tamal Saha <tamal@appscode.com>
@tamalsaha
tamalsaha merged commit 90eed06 into master Jul 13, 2026
2 checks passed
@tamalsaha
tamalsaha deleted the modernize-golangci-lint branch July 13, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant