chore: migrate to golangci-lint v2
This commit is contained in:
parent
1c559ed2e5
commit
0b15a50f48
|
@ -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$
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user