Skip to content

Commit

Permalink
Run other linters as much as possible
Browse files Browse the repository at this point in the history
  • Loading branch information
haya14busa committed May 31, 2020
1 parent fe17300 commit 0c74ec8
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions project/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ func Run(ctx context.Context, conf *Config, runners map[string]bool, c reviewdog
if results.Len() == 0 {
return nil
}
if err := checkUnexpectedFailures(results); err != nil {
return err
}

b, err := d.Diff(ctx)
if err != nil {
Expand All @@ -114,6 +111,9 @@ func Run(ctx context.Context, conf *Config, runners map[string]bool, c reviewdog
results.Range(func(toolname string, result *reviewdog.Result) {
rs := result.CheckResults
g.Go(func() error {
if err := result.CheckUnexpectedFailure(); err != nil {
return err
}
return reviewdog.RunFromResult(ctx, c, rs, filediffs, d.Strip(), toolname, filterMode, failOnError)
})
})
Expand Down Expand Up @@ -155,18 +155,6 @@ func checkUnknownRunner(specifiedRunners map[string]bool, usedRunners []string)
return nil
}

func checkUnexpectedFailures(results *reviewdog.ResultMap) error {
var err error
results.Range(func(toolname string, result *reviewdog.Result) {
// Skip if err is already found.
if err != nil {
return
}
err = result.CheckUnexpectedFailure()
})
return err
}

func getRunnerName(key string, runner *Runner) string {
if runner.Name != "" {
return runner.Name
Expand Down

0 comments on commit 0c74ec8

Please sign in to comment.