Skip to content

chore: add golangci-lint with a maximal ruleset - #19

Open
brahmlower wants to merge 2 commits into
mainfrom
brahmlower/golangci-lint
Open

chore: add golangci-lint with a maximal ruleset#19
brahmlower wants to merge 2 commits into
mainfrom
brahmlower/golangci-lint

Conversation

@brahmlower

Copy link
Copy Markdown
Owner

Summary

  • Adds .golangci.yml enabling every golangci-lint v2 linter (linters.default: all), with a small, justified disable list for linters that are deprecated or fight this codebase's idiomatic style (exhaustruct, err113, noinlineerr, varnamelen, gochecknoglobals, godox), plus tuned settings for depguard, forbidigo, lll, funlen, and tagliatelle — see comments in the config for rationale on each.
  • Fixes all 407 findings the ruleset surfaced across the codebase: missing doc comments, unwrapped errors, gosec justifications, magic numbers, a handful of complexity-driven refactors (behavior-preserving), and test hygiene (parallelization, testify assertion style, external test packages).
  • Adds a lint job to .github/workflows/tests.yaml (via golangci-lint-action) and a task lint entry to taskfile.yaml.

Test plan

  • go build ./...
  • go vet ./...
  • go test ./...
  • golangci-lint run ./... — 0 issues (including with --max-same-issues=0 --max-issues-per-linter=0)
  • gofmt -l . — clean
  • Manual CLI smoke test (helm-values --help, schema --help, version)

🤖 Generated with Claude Code

brahmlower and others added 2 commits August 16, 2026 17:19
Enables every golangci-lint v2 linter (linters.default: all) with a small,
justified disable list (deprecated linters, and a handful that fight this
codebase's idiomatic style: exhaustruct, err113, noinlineerr, varnamelen,
gochecknoglobals, godox), plus tuned settings for depguard, forbidigo, lll,
funlen, and tagliatelle.

Fixes all 407 findings the ruleset surfaced: missing doc comments, unwrapped
errors, gosec justifications, magic numbers, complexity refactors, and test
hygiene (parallelization, testify assertions, external test packages). Adds
a lint CI job and a `task lint` entry.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- exhaustive linter flagged the yaml.Kind switch in generate.go for not
  listing DocumentNode/AliasNode/StreamNode even though a default case
  already errors on unhandled kinds; enable default-signifies-exhaustive
  so a default case satisfies the check as intended.
- helm plugin install now enforces signature verification by default and
  errors when no .prov file is present; pass --verify=false since the
  local snapshot plugin is intentionally built unsigned (--sign=false).
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