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 (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -187,7 +188,10 @@ func (r Runner) Run(ctx context.Context, linters []*linter.Config, lintCtx *lint
|
|||||||
linterIssues, err := r.runLinterSafe(ctx, lintCtx, lc)
|
linterIssues, err := r.runLinterSafe(ctx, lintCtx, lc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
r.Log.Warnf("Can't run linter %s: %s", lc.Linter.Name(), err)
|
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
|
runErr = err
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
issues = append(issues, linterIssues...)
|
issues = append(issues, linterIssues...)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user