aboutsummaryrefslogtreecommitdiff
path: root/.golangci.yaml
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2026-04-09 21:57:05 +0200
committerStefan Majewsky <majewsky@gmx.net>2026-04-09 21:57:05 +0200
commit2b1a816d85bbb6ab38e975cd6aa6b8894aad0017 (patch)
tree18725f3cb9164e3285a530a1db8b406df20c1f39 /.golangci.yaml
parent3dc101181ac04791b423441424dd4937f31d46fa (diff)
downloadgo-oblast-2b1a816d85bbb6ab38e975cd6aa6b8894aad0017.tar.gz
project scaffold
Diffstat (limited to '.golangci.yaml')
-rw-r--r--.golangci.yaml89
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 ]