Skip to content

Actualize nelm engine: extract NelmEngine with DI, add helm-render rule - #436

Closed
diyliv wants to merge 6 commits into
mainfrom
fix/helmignore-missing-chart-dirs
Closed

Actualize nelm engine: extract NelmEngine with DI, add helm-render rule#436
diyliv wants to merge 6 commits into
mainfrom
fix/helmignore-missing-chart-dirs

Conversation

@diyliv

@diyliv diyliv commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Refactor the monolithic internal/helm/render.go into a pluggable NelmEngine following the d8-package-plugin architecture, and add a configurable helm-render rule to the templates linter.

Changes

Action File Purpose
Create internal/helm/engine.go NelmEngine with DI via EngineOption functional options
Modify internal/helm/render.go Renderer delegates to NelmEngine internally
Modify pkg/config.go HelmRenderRule in TemplatesLinterRules
Modify pkg/config/linters_settings.go mapstructure type helm-render
Modify pkg/config/global/global.go global config field
Modify internal/module/module.go values field + GetValues() + config wiring
Create internal/module/helm_overrides.go Export HelmLibOverrides() for shared use
Create pkg/linters/templates/rules/helm_render.go HelmRenderRule with Check()
Create pkg/linters/templates/rules/helm_render_test.go Unit tests
Modify pkg/linters/templates/templates.go Register helm-render rule in linter

Architecture

Before:  Renderer (monolith) -> nelm chart loader/engine
After:   NelmEngine (DI) -> loaded by Rules -> through Linters -> managed by Manager
                              ^
         HelmRenderRule ------+ (pluggable, configurable via .dmt.yaml)

Config

# .dmt.yaml
linters-settings:
  templates:
    rules:
      helm-render: warn  # per-rule severity

Verification

  • All existing tests pass (internal/helm: 3/3, module, templates rules)
  • New helm_render_test.go passes
  • go vet clean on all affected packages
  • Full go test ./internal/... ./pkg/... passes

diyliv added 6 commits July 20, 2026 11:21
Signed-off-by: diyliv <onlogn081@gmail.com>
Signed-off-by: diyliv <onlogn081@gmail.com>
Signed-off-by: diyliv <onlogn081@gmail.com>
Signed-off-by: diyliv <onlogn081@gmail.com>
Signed-off-by: diyliv <onlogn081@gmail.com>
…linter registration

Signed-off-by: diyliv <onlogn081@gmail.com>
@diyliv diyliv closed this Jul 27, 2026
@diyliv
diyliv deleted the fix/helmignore-missing-chart-dirs branch July 27, 2026 14:23
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