icingadb/.golangci.yml
Alvar Penning f1956fd9a1
golangci-lint: Add .golangci.yml configuration
Initialize a .golangci.yml configuration file based on the configuration
file from Icinga Notifications[0].

[0]: 272ecf231f/.golangci.yml
2025-10-14 15:12:57 +02:00

31 lines
1.1 KiB
YAML

version: "2"
linters:
default: standard
enable:
- bidichk # dangerous Unicode chars
- bodyclose # HTTP response body is closed
- exptostd # functions from golang.org/x/exp/ that can be replaced by std functions
- forcetypeassert # forced type assertions
- gosec # security problems
- loggercheck # key value pairs for common logger libraries (including zap)
- misspell # commonly misspelled English words
- nosprintfhostport # misuse of Sprintf to construct a host with port in a URL
- rowserrcheck # Rows.Err of rows is checked
- sqlclosecheck # sql.Rows, sql.Stmt, sqlx.NamedStmt, pgx.Query are closed
settings:
staticcheck:
checks:
- all
- '-QF1001' # don't suggest De Morgan's law for boolean expressions
- '-QF1003' # ignore could use tagged switch
- '-QF1008' # ignore could remove embedded field
- '-ST1000' # ignore missing package comments
- '-ST1003' # ignore capitalization in camel case names
- '-ST1005' # ignore capitalized error strings
issues:
max-issues-per-linter: 0
max-same-issues: 0