fixed the parsing

pull/13205/head
Danilo Patrucco 1 year ago
parent c6b4b901b2
commit a77a268a24

@ -88,9 +88,9 @@ func newLintCmd(out io.Writer) *cobra.Command {
if lintIgnoreFile != "" { if lintIgnoreFile != "" {
fmt.Printf("\nUsing ignore file: %s\n", lintIgnoreFile) fmt.Printf("\nUsing ignore file: %s\n", lintIgnoreFile)
ignorePatterns, err = rules.ParseIgnoreFile(lintIgnoreFile) ignorePatterns, err = rules.ParseIgnoreFile(lintIgnoreFile)
if err != nil { // if err != nil {
return fmt.Errorf("failed to parse .helmlintignore file: %v", err) // return fmt.Errorf("failed to parse .helmlintignore file: %v", err)
} // }
} }
var message strings.Builder var message strings.Builder
failed := 0 failed := 0
@ -133,6 +133,9 @@ func FilterIgnoredMessages(result *action.LintResult, patterns map[string][]stri
filteredMessages := make([]support.Message, 0) filteredMessages := make([]support.Message, 0)
for _, msg := range result.Messages { for _, msg := range result.Messages {
fullPath := extractFullPathFromError(msg.Err.Error()) fullPath := extractFullPathFromError(msg.Err.Error())
if len(fullPath) == 0 {
break
}
fmt.Printf("Extracted full path: %s\n", fullPath) fmt.Printf("Extracted full path: %s\n", fullPath)
ignore := false ignore := false
for path, pathPatterns := range patterns { for path, pathPatterns := range patterns {

Loading…
Cancel
Save