chore: update golangci-lint configuration and CI workflow version
- Upgraded golangci-lint version from v1.64.8 to v2.1.6 for enhanced linting capabilities. - Updated configuration to remove the lll linter and adjusted related settings for improved code quality checks. - Streamlined issue exclusions to better align with current project needs.
This commit is contained in:
@@ -78,7 +78,7 @@ jobs:
|
||||
- name: Run golangci-lint
|
||||
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v6.5.0
|
||||
with:
|
||||
version: v1.64.8
|
||||
version: v2.1.6
|
||||
args: --timeout=5m
|
||||
|
||||
# Stage 3: Test with Coverage (depends on lint)
|
||||
|
||||
+2
-10
@@ -1,3 +1,5 @@
|
||||
version: "2"
|
||||
|
||||
run:
|
||||
timeout: 5m
|
||||
tests: true
|
||||
@@ -24,7 +26,6 @@ linters:
|
||||
- dupl
|
||||
- funlen
|
||||
- gocognit
|
||||
- lll
|
||||
- nakedret
|
||||
- prealloc
|
||||
- stylecheck
|
||||
@@ -56,9 +57,6 @@ linters-settings:
|
||||
lines: 120
|
||||
statements: 60
|
||||
|
||||
lll:
|
||||
line-length: 150
|
||||
|
||||
gocritic:
|
||||
enabled-tags:
|
||||
- diagnostic
|
||||
@@ -106,11 +104,6 @@ issues:
|
||||
linters:
|
||||
- errcheck
|
||||
|
||||
# Allow long lines in test files
|
||||
- path: _test\.go
|
||||
linters:
|
||||
- lll
|
||||
|
||||
# Exclude dupl from ONVIF API files - similar patterns are expected
|
||||
- path: (media|device|ptz|imaging|device_security|device_additional)\.go
|
||||
linters:
|
||||
@@ -123,7 +116,6 @@ issues:
|
||||
|
||||
max-issues-per-linter: 50
|
||||
max-same-issues: 10
|
||||
exclude-use-default: false
|
||||
|
||||
output:
|
||||
print-issued-lines: true
|
||||
|
||||
Reference in New Issue
Block a user