Files
query-orchestration/.golangci.yml
T
Michael McGuinness 3028fe7eaa Merged in feature/linting (pull request #168)
Linting Updates

* precommit

* smallerchecks

* govuln
2025-06-23 15:58:20 +00:00

79 lines
1.9 KiB
YAML

---
linters:
enable:
- errcheck
- gosimple
- govet
- staticcheck
- typecheck
- unused
- gofmt
- goimports
- gosec
- misspell
- sloglint
- spancheck
- godox
- cyclop
- unused
- usetesting
- paralleltest
- bodyclose # Check HTTP response bodies are closed
- gochecknoinits # Disallow `init` functions
# - gocritic # Advanced style/performance checks
# - errorlint # Enforce error wrapping best practices
# - exhaustive # Require case exhaustiveness in switches
# - forbidigo # Ban specific identifiers (e.g., unsafe patterns)
# - nestif # Limit nested complexity (default: min-complexity=5)
linters-settings:
errcheck:
check-type-assertions: true
gofmt:
simplify: true
goimports:
local-prefixes: queryorchestration
misspell:
locale: US
cyclop:
max-complexity: 17
package-average: 10
godox:
keywords:
- OPTIMIZE
- HACK
- TODO
- FIXME
# govet:
# enable-all: true # Enable all vet analyzers
# gocritic:
# enabled-checks:
# - rangeValCopy # Warn on copying large range values
# - hugeParam # Warn on large parameters passed by value
# - badCall # Detect suspicious function calls
# # Add other strict checks from https://go-critic.com
issues:
exclude-rules:
- path-except: ^test/
linters:
- paralleltest
- path: cmd/metricsExample_test/main\.go
linters:
- gosec
text: "G404"
- path: internal/serviceconfig/observability/prometheus/prometheus_test.go
linters:
- gosec
text: "G107"
- path: internal/serviceconfig/observability/prometheus/generator/main.go
linters:
- gosec
text: "G306"
- path: internal/serviceconfig/objectstore/config.go
linters:
- gosec
text: "G401|G501"
max-issues-per-linter: 0
max-same-issues: 0