From 4dbb8a4fc4d29f263f9024aa9fdf4cbe95d1893f Mon Sep 17 00:00:00 2001 From: Daksh Sangal <134773611+Qu-Ack@users.noreply.github.com> Date: Fri, 19 Sep 2025 21:22:24 +0530 Subject: [PATCH] prfeedback(lint): change in lint flow Signed-off-by: Daksh Sangal <134773611+Qu-Ack@users.noreply.github.com> --- internal/chart/v3/lint/rules/template.go | 7 ++----- pkg/chart/v2/lint/rules/template.go | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/internal/chart/v3/lint/rules/template.go b/internal/chart/v3/lint/rules/template.go index 21658c5a3..408492584 100644 --- a/internal/chart/v3/lint/rules/template.go +++ b/internal/chart/v3/lint/rules/template.go @@ -123,13 +123,10 @@ func TemplatesWithSkipSchemaValidation(linter *support.Linter, values map[string fileName := template.Name fpath = fileName - // skip the linting rules if the file starts with _ and is not a yml/yaml file - if isHelperFile(fileName) { - continue + if !isHelperFile(fileName) { + linter.RunLinterRule(support.ErrorSev, fpath, validateAllowedExtension(fileName)) } - linter.RunLinterRule(support.ErrorSev, fpath, validateAllowedExtension(fileName)) - // We only apply the following lint rules to yaml files if filepath.Ext(fileName) != ".yaml" || filepath.Ext(fileName) == ".yml" { continue diff --git a/pkg/chart/v2/lint/rules/template.go b/pkg/chart/v2/lint/rules/template.go index 3f567136e..52167174a 100644 --- a/pkg/chart/v2/lint/rules/template.go +++ b/pkg/chart/v2/lint/rules/template.go @@ -123,13 +123,10 @@ func TemplatesWithSkipSchemaValidation(linter *support.Linter, values map[string fileName := template.Name fpath = fileName - // skip the linting rules if the file starts with _ and is not a yaml/yml file - if isHelperFile(fileName) { - continue + if !isHelperFile(fileName) { + linter.RunLinterRule(support.ErrorSev, fpath, validateAllowedExtension(fileName)) } - linter.RunLinterRule(support.ErrorSev, fpath, validateAllowedExtension(fileName)) - // We only apply the following lint rules to yaml files if filepath.Ext(fileName) != ".yaml" || filepath.Ext(fileName) == ".yml" { continue