Merged in feature/linting (pull request #168)
Linting Updates * precommit * smallerchecks * govuln
This commit is contained in:
+20
-5
@@ -17,6 +17,14 @@ linters:
|
||||
- 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:
|
||||
@@ -36,9 +44,20 @@ linters-settings:
|
||||
- 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
|
||||
@@ -54,10 +73,6 @@ issues:
|
||||
- path: internal/serviceconfig/objectstore/config.go
|
||||
linters:
|
||||
- gosec
|
||||
text: "G401"
|
||||
- path: internal/serviceconfig/objectstore/config.go
|
||||
linters:
|
||||
- gosec
|
||||
text: "G501"
|
||||
text: "G401|G501"
|
||||
max-issues-per-linter: 0
|
||||
max-same-issues: 0
|
||||
|
||||
Reference in New Issue
Block a user