Skip to content

Commit

Permalink
Fix error message and remove unreachable code
Browse files Browse the repository at this point in the history
  • Loading branch information
mengelbart authored and Sean-Der committed Nov 15, 2024
1 parent aa8e3b6 commit 181c9da
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/lint_no_trailing_newline_in_log_messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ func main() {

for _, match := range logReg.FindAll(fileContents, -1) {
if !strings.Contains(string(match), "nolint") {
return fmt.Errorf("Log format strings should have trailing new-line: %s", match)
os.Exit(1)
return fmt.Errorf("Log format strings should not have trailing new-line: %s", match)
}
}

Expand Down

0 comments on commit 181c9da

Please sign in to comment.