upgrade to golangci-lint/v2; golangci-lint migrate; go mod tidy; (make lint fails now)

This commit is contained in:
Christian Schwarz
2026-01-20 22:00:22 +00:00
parent cf3dda5a65
commit b4b16f7bca
4 changed files with 375 additions and 315 deletions
+36 -21
View File
@@ -1,24 +1,39 @@
version: "2"
linters:
enable:
- goimports
- revive
linters-settings:
goimports:
local-prefixes: github.com/zrepl/zrepl
revive:
- revive
settings:
revive:
rules:
- name: time-equal
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- name: time-equal
issues:
exclude-rules:
- path: _test\.go
linters:
- errcheck
# Disable staticcheck 'Empty body in an if or else branch' as it's useful
# to put a comment into an empty else-clause that explains why whatever
# is done in the if-caluse is not necessary if the condition is false.
- linters:
- staticcheck
text: "SA9003:"
- linters:
- errcheck
path: _test\.go
- linters:
- staticcheck
text: 'SA9003:'
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- goimports
settings:
goimports:
local-prefixes:
- github.com/zrepl/zrepl
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$