Fix after #890: don't propagate linter errors for golangci.com
This commit is contained in:
parent
1ac15487b2
commit
40d7bcd53e
@ -3,6 +3,7 @@ package lint
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
|
||||
@ -187,7 +188,10 @@ func (r Runner) Run(ctx context.Context, linters []*linter.Config, lintCtx *lint
|
||||
linterIssues, err := r.runLinterSafe(ctx, lintCtx, lc)
|
||||
if err != nil {
|
||||
r.Log.Warnf("Can't run linter %s: %s", lc.Linter.Name(), err)
|
||||
if os.Getenv("GOLANGCI_COM_RUN") == "" {
|
||||
// Don't stop all linters on one linter failure for golangci.com.
|
||||
runErr = err
|
||||
}
|
||||
return
|
||||
}
|
||||
issues = append(issues, linterIssues...)
|
||||
|
Loading…
x
Reference in New Issue
Block a user