diff options
Diffstat (limited to '.golangci.yaml')
| -rw-r--r-- | .golangci.yaml | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 0000000..6222cab --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,89 @@ +# SPDX-FileCopyrightText: 2026 Stefan Majewsky <majewsky@gmx.net> +# SPDX-License-Identifier: Apache-2.0 + +version: "2" +run: + modules-download-mode: vendor + timeout: 3m0s # none by default in v2 + +formatters: + enable: + - gofmt + - goimports + +issues: + max-issues-per-linter: 0 # no limit + max-same-issues: 0 # no limit + +linters: + default: standard + enable: + - errorlint + - exhaustive + - gocheckcompilerdirectives + - goconst + - gocritic + - gosec + - intrange + - misspell + - musttag + - nilerr + - nolintlint + - perfsprint + - prealloc + - predeclared + - reassign + - unconvert + - usestdlibvars + - usetesting + - wastedassign + - whitespace + settings: + goconst: + min-occurrences: 5 + gocritic: + disable-all: true + enabled-checks: + - boolExprSimplify + - builtinShadow + - emptyStringTest + - evalOrder + - httpNoBody + - importShadow + - initClause + - methodExprCall + - paramTypeCombine + - preferFilepathJoin + - ptrToRefParam + - redundantSprint + - returnAfterHttpError + - stringConcatSimplify + - timeExprSimplify + - truncateCmp + - typeAssertChain + - typeUnparen + - unnamedResult + - unnecessaryBlock + - unnecessaryDefer + - weakCond + - yodaStyleExpr + gomoddirectives: + toolchain-forbidden: true + go-version-pattern: 1\.\d+(\.0)?$ + nolintlint: + require-specific: true + staticcheck: + dot-import-whitelist: + - github.com/majewsky/gg/option + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - path: (.+)\.go$ + text: declaration of "err" shadows declaration at + - path: _test\.go + linters: [ goconst ] |
