Files
query-orchestration/.golangci.yml
T

79 lines
1.9 KiB
YAML
Raw Normal View History

2025-03-05 12:05:46 +00:00
---
linters:
enable:
- errcheck
- gosimple
- govet
- staticcheck
- typecheck
- unused
- gofmt
- goimports
- gosec
- misspell
- sloglint
- spancheck
- godox
- cyclop
- unused
2025-06-03 13:52:10 +00:00
- 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)
2025-03-05 12:05:46 +00:00
linters-settings:
errcheck:
check-type-assertions: true
gofmt:
simplify: true
goimports:
local-prefixes: queryorchestration
misspell:
locale: US
cyclop:
max-complexity: 17
2025-03-05 18:25:12 +00:00
package-average: 10
2025-03-05 12:05:46 +00:00
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
2025-03-05 12:05:46 +00:00
issues:
exclude-rules:
- path-except: ^test/
linters:
- paralleltest
2025-03-05 12:05:46 +00:00
- path: cmd/metricsExample_test/main\.go
linters:
- gosec
text: "G404"
- path: internal/serviceconfig/observability/prometheus/prometheus_test.go
linters:
- gosec
text: "G107"
2025-03-05 18:25:12 +00:00
- path: internal/serviceconfig/observability/prometheus/generator/main.go
linters:
- gosec
text: "G306"
- path: internal/serviceconfig/objectstore/config.go
linters:
- gosec
text: "G401|G501"
2025-03-05 12:05:46 +00:00
max-issues-per-linter: 0
max-same-issues: 0