Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HIP: Add Exclude File Option to Helm Lint Command #353

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

danilo-patrucco
Copy link

Added HIP 0019 for the development of the lint ignore feature in helm binaries
refer to issue in helm repository #13133

Signed-off-by: Danilo Patrucco <[email protected]>
Signed-off-by: danilo-patrucco <[email protected]>
Signed-off-by: Danilo Patrucco <[email protected]>
Signed-off-by: Danilo Patrucco <[email protected]>
@danilo-patrucco danilo-patrucco changed the title add hip-0019 HIP: Add Exclude File Option to Helm Lint Command Jul 3, 2024
Add Daniel Pritchett due to his participation in the feature development 



Signed-off-by: danilo patrucco <[email protected]>
dpritchett added a commit to danilo-patrucco/helm that referenced this pull request Aug 15, 2024
See HIP-0019 proposal at helm/community: helm/community#353

Co-authored-by: Danilo Patrucco <[email protected]>

Signed-off-by: Daniel J. Pritchett <[email protected]>
dpritchett added a commit to danilo-patrucco/helm that referenced this pull request Aug 15, 2024
See HIP-0019 proposal at helm/community: helm/community#353

Co-authored-by: Danilo Patrucco <[email protected]>

Signed-off-by: Daniel J. Pritchett <[email protected]>
dpritchett added a commit to danilo-patrucco/helm that referenced this pull request Aug 15, 2024
See HIP-0019 proposal at helm/community: helm/community#353

Co-Authored-By: Danilo Patrucco <[email protected]>

Signed-off-by: Daniel J. Pritchett <[email protected]>
dpritchett added a commit to danilo-patrucco/helm that referenced this pull request Aug 16, 2024
See HIP-0019 proposal at helm/community: helm/community#353

Co-authored-by: Danilo Patrucco <[email protected]>

Signed-off-by: Daniel J. Pritchett <[email protected]>
dpritchett added a commit to danilo-patrucco/helm that referenced this pull request Aug 16, 2024
- adds ignorer usage to cmd/helm/lint.go
- adds ignorer usage to pkg/action/lint.go and its lint_test.go

See HIP-0019 proposal at helm/community: helm/community#353

Co-authored-by: Danilo Patrucco <[email protected]>

Signed-off-by: Daniel J. Pritchett <[email protected]>
hips/hip-0019.md Outdated Show resolved Hide resolved
hips/hip-0019.md Outdated Show resolved Hide resolved
hips/hip-0019.md Outdated
The `.helmlintignore` file will support simple patterns to match files and directories for easy exclusion management. The `--lint-ignore-file` flag enhances this by allowing centralized management of lint exclusions in complex projects.
## Specification
### `.helmlintignore` File Format
The `.helmlintignore` file allows chart developers to specify filenames or glob patterns to exclude from linting. The format is straightforward, with one pattern per line, similar to `.gitignore` files.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a yaml format that can encode different types of rules/options for linting would be much more preferable than a custom / one-file-per-line format (that is limited to just that).

I also think that all/nothing for lint ignoring (per-file) is too course for the general case. Especially since many lint rules pertain (in Helm) to e.g. Chart.yaml (ref). Likely it normally would be better to exclude certain rules for Chart specific files (Chart.yaml, values.yaml (default values), etc), and paths for templates, etc. See https://github.com/helm/helm/tree/main/pkg/lint/rules for current Helm linting rules.

Also take e.g. https://yamllint.readthedocs.io/en/stable/configuration.html#configuration or https://ansible.readthedocs.io/projects/lint/configuring/#ansible-lint-configuration as inspirations/examples for what might go into a lint configuration (of course not every there will apply to Helm).

hips/hip-0019.md Outdated Show resolved Hide resolved
hips/hip-0019.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants