mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-28 22:28:43 -04:00
runner: non-zero exit code when a linter produces a panic (#1979)
This commit is contained in:
parent
589c49efea
commit
625445b1f5
1 changed files with 2 additions and 2 deletions
|
@ -108,10 +108,10 @@ func (r *Runner) runLinterSafe(ctx context.Context, lintCtx *linter.Context,
|
|||
err = fmt.Errorf("%s: %w", lc.Name(), pe)
|
||||
|
||||
// Don't print stacktrace from goroutines twice
|
||||
lintCtx.Log.Warnf("Panic: %s: %s", pe, pe.Stack())
|
||||
r.Log.Errorf("Panic: %s: %s", pe, pe.Stack())
|
||||
} else {
|
||||
err = fmt.Errorf("panic occurred: %s", panicData)
|
||||
r.Log.Warnf("Panic stack trace: %s", debug.Stack())
|
||||
r.Log.Errorf("Panic stack trace: %s", debug.Stack())
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue