Skip to content

[dmt] check helmignore root coverage#425

Open
diyliv wants to merge 1 commit into
mainfrom
feature/helmignore-root-coverage
Open

[dmt] check helmignore root coverage#425
diyliv wants to merge 1 commit into
mainfrom
feature/helmignore-root-coverage

Conversation

@diyliv

@diyliv diyliv commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • New check: .helmignore must cover every file and directory in the module root, except the standard Helm chart template entries (templates/, charts/, Chart.yaml, values.yaml).
  • Uses Helm ignore engine: leverages helm.sh/helm/v3/pkg/ignore for proper pattern matching (wildcards, negation, directory-only rules).
  • Affected files: pkg/linters/module/rules/helmignore.go, pkg/linters/module/rules/helmignore_test.go, e2e test fixtures.

Context

When a new directory (e.g. images/, hooks/) or file (e.g. go.mod, module.yaml) is added to a module root, developers often forget to add it to .helmignore. These files then leak into the Helm chart, increasing its size.

The rule now scans the entire module root and flags any entry that is not covered by .helmignore, except the four standard Helm template entries that must remain in the chart.

Example

Before: module has images/ and go.mod but .helmignore only lists hooks/ — no error.

After:

Error: Directory 'images/' is not listed in .helmignore
Error: File 'go.mod' is not listed in .helmignore

Excluding resources

linters-settings:
  module:
    helmignore:
      disable: true   # disables the entire rule

@diyliv diyliv changed the title check helmignore root coverage [dmt] check helmignore root coverage Jul 14, 2026
@diyliv diyliv self-assigned this Jul 14, 2026
@diyliv diyliv marked this pull request as draft July 14, 2026 15:14
@diyliv diyliv force-pushed the feature/helmignore-root-coverage branch 2 times, most recently from aba7628 to f953543 Compare July 15, 2026 08:16
Signed-off-by: diyliv <onlogn081@gmail.com>
@diyliv diyliv force-pushed the feature/helmignore-root-coverage branch from f953543 to 562db28 Compare July 15, 2026 08:19
@diyliv diyliv marked this pull request as ready for review July 15, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant