constellation/.golangci.yml
renovate[bot] ec46c97d4c
deps: update golangci/golangci-lint to v2 (major) (#3709)
* deps: update golangci/golangci-lint to v2

* deps: tidy all modules

* ci: migrate golangci-lint config to v2

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: edgelessci <edgelessci@users.noreply.github.com>
Co-authored-by: Markus Rudy <mr@edgeless.systems>
2025-03-25 11:30:13 +01:00

66 lines
1.5 KiB
YAML

version: "2"
run:
build-tags:
- integration
- e2e
modules-download-mode: readonly
output:
formats:
tab:
path: stdout
colors: false
linters:
enable:
- bodyclose
- copyloopvar
- errname
- godot
- misspell
- noctx
- revive
- unconvert
- unparam
- usetesting
settings:
errcheck:
exclude-functions:
- (*go.uber.org/zap.Logger).Sync
- (*google.golang.org/grpc.Server).Serve
exclusions:
generated: lax
presets:
- common-false-positives
- legacy
- std-error-handling
paths:
- 3rdparty/node-maintenance-operator
rules:
# TODO(burgerdev): these exclusions have been added to ease migration to v2 and should eventually be addressed.
- linters: ["staticcheck"]
text: "QF1008: could remove embedded field"
- linters: ["staticcheck"]
text: "QF1001: could apply De Morgan's law"
- linters: ["staticcheck"]
text: "ST1005: error strings should not be capitalized"
- linters: ["revive"]
text: "package-comments: package comment should be of the form"
- linters: ["revive"]
text: "package-comments: should have a package comment"
- linters: ["staticcheck"]
text: "QF1012: Use fmt.Fprintf"
- linters: ["staticcheck"]
text: "ST1019"
issues:
max-issues-per-linter: 0
max-same-issues: 20
formatters:
enable:
- gofmt
- gofumpt
exclusions:
generated: lax
paths:
- 3rdparty/node-maintenance-operator