chore: refine golangci-lint configuration for better clarity and focus
- Removed goimports and gosec configurations to streamline the linter setup. - Adjusted exclusion rules for specific linters in test files and ONVIF API files to minimize false positives. - Cleaned up unnecessary comments and settings for improved readability.
This commit is contained in:
@@ -14,7 +14,6 @@ linters:
|
||||
- gosimple
|
||||
- ineffassign
|
||||
- gofmt
|
||||
- goimports
|
||||
- misspell
|
||||
- unconvert
|
||||
- unparam
|
||||
@@ -71,20 +70,12 @@ linters:
|
||||
- whyNoLint
|
||||
- wrapperFunc
|
||||
|
||||
gosec:
|
||||
severity: medium
|
||||
confidence: medium
|
||||
|
||||
godot:
|
||||
scope: declarations
|
||||
exclude:
|
||||
- "^TODO:"
|
||||
- "^FIXME:"
|
||||
|
||||
goimports:
|
||||
local-prefixes:
|
||||
- github.com/0x524a/onvif-go
|
||||
|
||||
misspell:
|
||||
locale: US
|
||||
|
||||
@@ -94,7 +85,6 @@ linters:
|
||||
- comments
|
||||
- std-error-handling
|
||||
rules:
|
||||
# Exclude some linters from test files
|
||||
- path: _test\.go
|
||||
linters:
|
||||
- errcheck
|
||||
@@ -104,18 +94,13 @@ linters:
|
||||
- gocognit
|
||||
- dupl
|
||||
|
||||
# Exclude dupl from ONVIF API files - similar patterns are expected
|
||||
- path: (media|device|ptz|imaging|device_security|device_additional)\.go
|
||||
linters:
|
||||
- dupl
|
||||
|
||||
# Exclude dupl from cmd directories
|
||||
- path: cmd/
|
||||
linters:
|
||||
- dupl
|
||||
|
||||
max-issues-per-linter: 50
|
||||
max-same-issues: 10
|
||||
|
||||
output:
|
||||
formats:
|
||||
|
||||
Reference in New Issue
Block a user