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:
0x524a
2025-12-02 23:37:29 -05:00
parent c528c65761
commit 216040d7f7
-15
View File
@@ -14,7 +14,6 @@ linters:
- gosimple - gosimple
- ineffassign - ineffassign
- gofmt - gofmt
- goimports
- misspell - misspell
- unconvert - unconvert
- unparam - unparam
@@ -71,20 +70,12 @@ linters:
- whyNoLint - whyNoLint
- wrapperFunc - wrapperFunc
gosec:
severity: medium
confidence: medium
godot: godot:
scope: declarations scope: declarations
exclude: exclude:
- "^TODO:" - "^TODO:"
- "^FIXME:" - "^FIXME:"
goimports:
local-prefixes:
- github.com/0x524a/onvif-go
misspell: misspell:
locale: US locale: US
@@ -94,7 +85,6 @@ linters:
- comments - comments
- std-error-handling - std-error-handling
rules: rules:
# Exclude some linters from test files
- path: _test\.go - path: _test\.go
linters: linters:
- errcheck - errcheck
@@ -104,18 +94,13 @@ linters:
- gocognit - gocognit
- dupl - dupl
# Exclude dupl from ONVIF API files - similar patterns are expected
- path: (media|device|ptz|imaging|device_security|device_additional)\.go - path: (media|device|ptz|imaging|device_security|device_additional)\.go
linters: linters:
- dupl - dupl
# Exclude dupl from cmd directories
- path: cmd/ - path: cmd/
linters: linters:
- dupl - dupl
max-issues-per-linter: 50
max-same-issues: 10
output: output:
formats: formats: