feat: add lint subcommand to validate the config and input files - #355
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #355 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 17 18 +1
Lines 1923 2003 +80
=========================================
+ Hits 1923 2003 +80
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
somaz94
marked this pull request as ready for review
June 4, 2026 01:53
Contributor
Author
|
Gentle ping @losisin 🙏 — green and ready for review. This adds a |
Owner
|
@somaz94 I have it on my agenda to review. If it's ok, I'll create new release this weekend |
3 tasks
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.
Which problem does the PR fix?
Closes #260
What's in this PR?
Adds a
helm schema lintsubcommand that validates the config file and its input values files without generating a schema:.schema.yaml) for unknown fields and logs them as warnings (nested fields included). A type mismatch in the config is reported as a hard error rather than a warning.--strictflag exits with a non-zero code when any warning is reported.To avoid duplicating logic, the parsing/validation pipeline was extracted from
GenerateJsonSchemainto a sharedbuildJSONSchema, so generation and linting run the exact same code (pure refactor, existing tests unchanged).Checklist
go test -short ./...,golangci-lint,gosec,go vetandgofmtall clean