build: add golangci-lint configuration
staticcheck and unused stay disabled until honnef.co/go/tools supports the Go 1.27 standard library. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
ea6f022112
commit
048e114fd9
1 file changed
+48
@@ -0,0 +1,48 @@
|
||||
version: "2"
|
||||
|
||||
run:
|
||||
tests: true
|
||||
|
||||
linters:
|
||||
# staticcheck and unused are left out until honnef.co/go/tools supports
|
||||
# the Go 1.27 standard library; they panic during analysis otherwise.
|
||||
default: none
|
||||
enable:
|
||||
- errcheck
|
||||
- govet
|
||||
- ineffassign
|
||||
- revive
|
||||
- errorlint
|
||||
- gocritic
|
||||
- misspell
|
||||
- unconvert
|
||||
- usestdlibvars
|
||||
settings:
|
||||
revive:
|
||||
rules:
|
||||
- name: exported
|
||||
arguments: [checkPrivateReceivers, sayRepetitiveInsteadOfStutters]
|
||||
- name: package-comments
|
||||
- name: var-naming
|
||||
- name: receiver-naming
|
||||
- name: error-strings
|
||||
- name: error-naming
|
||||
- name: indent-error-flow
|
||||
- name: context-as-argument
|
||||
- name: unexported-return
|
||||
- name: blank-imports
|
||||
exclusions:
|
||||
generated: strict
|
||||
rules:
|
||||
- path: _test\.go
|
||||
linters: [revive]
|
||||
text: "exported"
|
||||
|
||||
formatters:
|
||||
enable:
|
||||
- gofmt
|
||||
- goimports
|
||||
settings:
|
||||
goimports:
|
||||
local-prefixes:
|
||||
- git.zb-server.de/ZB-Server/uptimesebi
|
||||
Reference in new issue
Block a user