Skip to content

Commit 40d7bcd

Browse files
committed
Fix after #890: don't propagate linter errors for golangci.com
1 parent 1ac1548 commit 40d7bcd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/lint/runner.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package lint
33
import (
44
"context"
55
"fmt"
6+
"os"
67
"runtime/debug"
78
"strings"
89

@@ -187,7 +188,10 @@ func (r Runner) Run(ctx context.Context, linters []*linter.Config, lintCtx *lint
187188
linterIssues, err := r.runLinterSafe(ctx, lintCtx, lc)
188189
if err != nil {
189190
r.Log.Warnf("Can't run linter %s: %s", lc.Linter.Name(), err)
190-
runErr = err
191+
if os.Getenv("GOLANGCI_COM_RUN") == "" {
192+
// Don't stop all linters on one linter failure for golangci.com.
193+
runErr = err
194+
}
191195
return
192196
}
193197
issues = append(issues, linterIssues...)

0 commit comments

Comments
 (0)