Skip to content

Commit

Permalink
Merge pull request #261 from skos-ninja/master
Browse files Browse the repository at this point in the history
Fix line count for errors on tap output
  • Loading branch information
carlossg committed Mar 29, 2021
2 parents 529b532 + ca095c2 commit c9ced79
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions kubeval/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,13 @@ func (j *tapOutputManager) Flush() error {
} else if r.Status == "skipped" {
j.logger.Print("ok ", count, " - ", r.Filename, kindMarker, " # SKIP")
} else if r.Status == "invalid" {
for _, e := range r.Errors {
for i, e := range r.Errors {
j.logger.Print("not ok ", count, " - ", r.Filename, kindMarker, " - ", e)
count = count + 1

// We have to skip adding 1 if it's the last error
if len(r.Errors) != i+1 {
count = count + 1
}
}
}
}
Expand Down

0 comments on commit c9ced79

Please sign in to comment.