chore: add golangci-lint with a maximal ruleset - #19
Open
brahmlower wants to merge 2 commits into
Open
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.golangci.ymlenabling 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 fordepguard,forbidigo,lll,funlen, andtagliatelle— see comments in the config for rationale on each.lintjob to.github/workflows/tests.yaml(viagolangci-lint-action) and atask lintentry totaskfile.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 .— cleanhelm-values --help,schema --help,version)🤖 Generated with Claude Code