From bb4916169f34176b566cad39d835b53d782f76fe Mon Sep 17 00:00:00 2001 From: Enin Kaduk Date: Tue, 11 Jun 2024 12:56:48 +0200 Subject: [PATCH] fix: allow Quiet flag in lint.Run() Signed-off-by: Enin Kaduk --- pkg/action/lint.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/action/lint.go b/pkg/action/lint.go index b15d4352f..4a709dc9f 100644 --- a/pkg/action/lint.go +++ b/pkg/action/lint.go @@ -54,7 +54,7 @@ func NewLint() *Lint { // Run executes 'helm Lint' against the given chart. func (l *Lint) Run(paths []string, vals map[string]interface{}) *LintResult { lowestTolerance := support.ErrorSev - if l.Strict { + if l.Strict || l.Quiet { lowestTolerance = support.WarningSev } result := &LintResult{} @@ -65,11 +65,12 @@ func (l *Lint) Run(paths []string, vals map[string]interface{}) *LintResult { continue } - result.Messages = append(result.Messages, linter.Messages...) result.TotalChartsLinted++ for _, msg := range linter.Messages { + // Unknown(0), Info(1), Warning(2), Error(3) if msg.Severity >= lowestTolerance { result.Errors = append(result.Errors, msg.Err) + result.Messages = append(result.Messages, msg) } } }