diff --git a/.golangci.yaml b/.golangci.yaml index d55bac5..adc889d 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,28 +1,43 @@ +version: "2" linters: enable: - bidichk - dupl - - errcheck - gocritic - - gofmt - - gofumpt - - goimports - gosec - - gosimple - - govet - - ineffassign - nakedret - nolintlint - prealloc - staticcheck - - stylecheck - testifylint - - typecheck - unconvert - - unused - unparam - usetesting - wastedassign -linters-settings: - stylecheck: - checks: ["all", "-ST1005"] + settings: + staticcheck: + checks: + - all + - -ST1005 + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofmt + - gofumpt + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/internal/parser/diff/parser.go b/internal/parser/diff/parser.go index 7133483..7aeaf8e 100644 --- a/internal/parser/diff/parser.go +++ b/internal/parser/diff/parser.go @@ -99,10 +99,7 @@ func (d *Diff) processOutput(output Output, result stage.ExecutorResult, conf *C } // They are different. - forceQuit := false - if output.ForceQuitOnDiff || conf.ForceQuitOnFailed { - forceQuit = true - } + forceQuit := output.ForceQuitOnDiff comment := conf.FailComment + "\n" comment += fmt.Sprintf("Difference found in `%s`\n", output.Filename)