From ff3707f11c7e64109698d9370f552aa43923acc7 Mon Sep 17 00:00:00 2001 From: Mathis Engelbart Date: Fri, 15 Nov 2024 15:29:54 +0100 Subject: [PATCH] Fix error message and remove unreachable code --- scripts/lint_no_trailing_newline_in_log_messages.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/lint_no_trailing_newline_in_log_messages.go b/scripts/lint_no_trailing_newline_in_log_messages.go index 5340b89..f6f6350 100644 --- a/scripts/lint_no_trailing_newline_in_log_messages.go +++ b/scripts/lint_no_trailing_newline_in_log_messages.go @@ -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) } }