chore: migrate to golangci-lint v2
This commit is contained in:
parent
1c559ed2e5
commit
0b15a50f48
|
@ -1,28 +1,43 @@
|
||||||
|
version: "2"
|
||||||
linters:
|
linters:
|
||||||
enable:
|
enable:
|
||||||
- bidichk
|
- bidichk
|
||||||
- dupl
|
- dupl
|
||||||
- errcheck
|
|
||||||
- gocritic
|
- gocritic
|
||||||
- gofmt
|
|
||||||
- gofumpt
|
|
||||||
- goimports
|
|
||||||
- gosec
|
- gosec
|
||||||
- gosimple
|
|
||||||
- govet
|
|
||||||
- ineffassign
|
|
||||||
- nakedret
|
- nakedret
|
||||||
- nolintlint
|
- nolintlint
|
||||||
- prealloc
|
- prealloc
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- stylecheck
|
|
||||||
- testifylint
|
- testifylint
|
||||||
- typecheck
|
|
||||||
- unconvert
|
- unconvert
|
||||||
- unused
|
|
||||||
- unparam
|
- unparam
|
||||||
- usetesting
|
- usetesting
|
||||||
- wastedassign
|
- wastedassign
|
||||||
linters-settings:
|
settings:
|
||||||
stylecheck:
|
staticcheck:
|
||||||
checks: ["all", "-ST1005"]
|
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$
|
||||||
|
|
|
@ -99,10 +99,7 @@ func (d *Diff) processOutput(output Output, result stage.ExecutorResult, conf *C
|
||||||
}
|
}
|
||||||
|
|
||||||
// They are different.
|
// They are different.
|
||||||
forceQuit := false
|
forceQuit := output.ForceQuitOnDiff
|
||||||
if output.ForceQuitOnDiff || conf.ForceQuitOnFailed {
|
|
||||||
forceQuit = true
|
|
||||||
}
|
|
||||||
comment := conf.FailComment + "\n"
|
comment := conf.FailComment + "\n"
|
||||||
comment += fmt.Sprintf("Difference found in `%s`\n", output.Filename)
|
comment += fmt.Sprintf("Difference found in `%s`\n", output.Filename)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user