Skip to content

feat: add lint_config input for custom yamllint rules - #208

Open
Bisman-Singh wants to merge 3 commits into
helm:mainfrom
Bisman-Singh:feat/custom-yamllint-config
Open

Bisman-Singh wants to merge 3 commits into
helm:mainfrom
Bisman-Singh:feat/custom-yamllint-config

Conversation

@Bisman-Singh

Copy link
Copy Markdown

Adds a lint_config input that lets users provide a custom yamllint config file. When set, it replaces the default lintconf.yaml in CT_CONFIG_DIR so ct lint picks it up automatically.

Usage:

- uses: helm/chart-testing-action@v2
  with:
    lint_config: .github/lintconf.yaml

This lets users customize yamllint rules (e.g. min-spaces-from-content, line-length) without needing to pass --lint-conf to every ct lint call.

When lint_config is not set, behavior is unchanged.

Fixes #176

@Bisman-Singh

Copy link
Copy Markdown
Author

@cpanato could you review this when you have a moment?

@Bisman-Singh
Bisman-Singh force-pushed the feat/custom-yamllint-config branch from ac5b762 to 877b402 Compare July 17, 2026 09:39
@Bisman-Singh
Bisman-Singh force-pushed the feat/custom-yamllint-config branch from 877b402 to d4f77f0 Compare July 17, 2026 09:57
@Bisman-Singh

Copy link
Copy Markdown
Author

Friendly ping on this one — it's been open a while.

Recap: this adds an optional lint_config input so a chart repo can pass its own yamllint rules to chart-testing, instead of being limited to the action's defaults. It's additive (no behaviour change when the input is unset), DCO is signed, and the branch is green.

Happy to rebase onto main or adjust the approach if you'd prefer it done differently. No rush — just flagging it in case it slipped off the queue. 🙂

@cpanato

cpanato commented Sep 17, 2026

Copy link
Copy Markdown
Member

@Bisman-Singh can you rebase to fix the conflicts? thanks

Fixes helm#176

Signed-off-by: Bisman-Singh <bismanmadaan1@gmail.com>
Signed-off-by: Bisman-Singh <bismanmadaan1@gmail.com>
@Bisman-Singh
Bisman-Singh force-pushed the feat/custom-yamllint-config branch from d4f77f0 to c581b55 Compare September 17, 2026 15:51
@Bisman-Singh

Copy link
Copy Markdown
Author

Rebased on main, thanks. The conflict was the new github_token input sitting where lint_config was added. While testing I found the old step wrote the config into the shared tool cache, which on self-hosted runners leaks into later jobs that never set lint_config, so it now passes the file through CT_LINT_CONF instead. That change is in its own commit so it's easy to review separately.

@cpanato

cpanato commented Sep 17, 2026

Copy link
Copy Markdown
Member

can we add a ci job test to exercise this feature? thanks again

Signed-off-by: Bisman-Singh <bismanmadaan1@gmail.com>
@pull-request-size pull-request-size Bot added size/M and removed size/S labels Sep 17, 2026
@Bisman-Singh

Copy link
Copy Markdown
Author

Added test_ct_action_with_lint_config. It lints the test chart with a config that only enables document-start, so it fails only when ct actually picks up the file, and it also checks that a missing file fails the action.

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.

[Feature Request] Allow custom yamllint rules

2 participants