From 048e114fd91919192c8e95f4fe17c4fe12dd542e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Untersch=C3=BCtz?= Date: Sun, 22 Nov 2026 00:18:02 +0100 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3 --- .golangci.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .golangci.yml diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..f9af16d --- /dev/null +++ b/.golangci.yml @@ -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