diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-07-30 20:07:04 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-07-30 20:07:04 +0200 |
| commit | b5cd5579747a459113a7e6c899fca5c6afbea066 (patch) | |
| tree | e999ef6e91d6aee2dea82f9c0fd636eb26cfc837 /.golangci.yaml | |
| download | go-gg-pgx-b5cd5579747a459113a7e6c899fca5c6afbea066.tar.gz | |
init
Diffstat (limited to '.golangci.yaml')
| -rw-r--r-- | .golangci.yaml | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 0000000..9d3fb3d --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,92 @@ +# SPDX-FileCopyrightText: 2025 Stefan Majewsky <majewsky@gmx.net> +# SPDX-License-Identifier: Apache-2.0 + +version: "2" +run: + 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: 6 + 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)?$ + gosec: + excludes: + - G204 # gosec likes to scream about the fact that we are passing paths derived from $PWD into command invocations + - G306 # gosec does not understand how umask works + nolintlint: + require-specific: true + staticcheck: + dot-import-whitelist: + - go.xyrillian.de/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 ] |
