You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overall this is a clean, well-structured addition. Four items worth addressing:
1. go vet with pass_filenames: true (.pre-commit-config.yaml:10-15)
The vet hook calls go vet directly with pass_filenames: true, but go vet expects package patterns, not individual file paths. When pre-commit passes individual .go files, this can produce unexpected behavior. Since a just vet target was added in this PR, consider using it for consistency with all the other hooks:
- id: vetname: Go vetentry: just vetlanguage: systempass_filenames: falsefiles: \.go$
2. helm-lint/helm-template won't fire after helm-generate (.pre-commit-config.yaml:31-43)
The helm-lint and helm-template hooks only trigger on ^dist/chart/ changes, but helm-generate runs on ^config/ changes and outputs into dist/chart/. In a single commit touching only config/ files, helm-generate will fire but helm-lint and helm-template won't, because the staged files are in config/, not dist/chart/.
Consider either adding ^config/ to the files pattern for the lint/template hooks, or documenting that contributors should run uvx pre-commit run --all-files after config changes.
3. SKIP=test examples reference a non-existent hook (CONTRIBUTING.md:80-81)
The SKIP examples use test as a hook id, but no hook with id test exists in .pre-commit-config.yaml. Use an actual hook id so the examples are accurate:
4. deps depending on install-git-hooks may break CI (Justfile:18)
Making deps depend on install-git-hooks means just deps will fail in environments without uvx installed (CI runners, Docker builds, new contributors without uv). Consider either:
Keeping install-git-hooks as a standalone target (not a dependency of deps)
Making it fault-tolerant with the - prefix: -uvx pre-commit install (ignores errors)
Adding uvx/uv to the prerequisites list in CONTRIBUTING.md
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
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
Adds pre-commit hooks to automate code quality checks and manifest generation.
Hooks
formatvet.gofiles onlymgenerateapi/**/*.gohelm-generateconfig/**helm-lintdist/chart/**helm-templatedist/chart/**Changes
.pre-commit-config.yaml- New file with 6 hooksJustfileinstall-git-hooksrecipe (runsuvx pre-commit install)vetrecipe (go vet ./...)depsnow runsinstall-git-hooksautomaticallyCONTRIBUTING.md--no-verify,SKIP=)Setup
just deps # or: just install-git-hooksTest plan
make helm-lintpassesmake helm-templaterenders cleanlymake helm-generateis idempotent (zero diff on re-run)