mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-21 08:27:02 +00:00
Enable gocritic
and don't ignore globally (#3159)
Use `nolint` directives instead. From #2960
This commit is contained in:
@@ -160,13 +160,14 @@ func (r *Runner) Run(runnerCtx context.Context) error {
|
||||
state.ExitCode = 137
|
||||
} else if err != nil {
|
||||
pExitError := &pipeline.ExitError{}
|
||||
if errors.As(err, &pExitError) {
|
||||
switch {
|
||||
case errors.As(err, &pExitError):
|
||||
state.ExitCode = pExitError.Code
|
||||
} else if errors.Is(err, pipeline.ErrCancel) {
|
||||
case errors.Is(err, pipeline.ErrCancel):
|
||||
state.Error = ""
|
||||
state.ExitCode = 137
|
||||
canceled.SetTo(true)
|
||||
} else {
|
||||
default:
|
||||
state.ExitCode = 1
|
||||
state.Error = err.Error()
|
||||
}
|
||||
|
Reference in New Issue
Block a user