Skip to content

Commit 625445b

Browse files
authored
runner: non-zero exit code when a linter produces a panic (#1979)
1 parent 589c49e commit 625445b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: pkg/lint/runner.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ func (r *Runner) runLinterSafe(ctx context.Context, lintCtx *linter.Context,
108108
err = fmt.Errorf("%s: %w", lc.Name(), pe)
109109

110110
// Don't print stacktrace from goroutines twice
111-
lintCtx.Log.Warnf("Panic: %s: %s", pe, pe.Stack())
111+
r.Log.Errorf("Panic: %s: %s", pe, pe.Stack())
112112
} else {
113113
err = fmt.Errorf("panic occurred: %s", panicData)
114-
r.Log.Warnf("Panic stack trace: %s", debug.Stack())
114+
r.Log.Errorf("Panic stack trace: %s", debug.Stack())
115115
}
116116
}
117117
}()

0 commit comments

Comments
 (0)