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
|
- name: Run golangci-lint
|
||||||
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v6.5.0
|
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v6.5.0
|
||||||
with:
|
with:
|
||||||
version: v1.64.8
|
version: v2.1.6
|
||||||
args: --timeout=5m
|
args: --timeout=5m
|
||||||
|
|
||||||
# Stage 3: Test with Coverage (depends on lint)
|
# Stage 3: Test with Coverage (depends on lint)
|
||||||
|
|||||||
+2
-10
@@ -1,3 +1,5 @@
|
|||||||
|
version: "2"
|
||||||
|
|
||||||
run:
|
run:
|
||||||
timeout: 5m
|
timeout: 5m
|
||||||
tests: true
|
tests: true
|
||||||
@@ -24,7 +26,6 @@ linters:
|
|||||||
- dupl
|
- dupl
|
||||||
- funlen
|
- funlen
|
||||||
- gocognit
|
- gocognit
|
||||||
- lll
|
|
||||||
- nakedret
|
- nakedret
|
||||||
- prealloc
|
- prealloc
|
||||||
- stylecheck
|
- stylecheck
|
||||||
@@ -56,9 +57,6 @@ linters-settings:
|
|||||||
lines: 120
|
lines: 120
|
||||||
statements: 60
|
statements: 60
|
||||||
|
|
||||||
lll:
|
|
||||||
line-length: 150
|
|
||||||
|
|
||||||
gocritic:
|
gocritic:
|
||||||
enabled-tags:
|
enabled-tags:
|
||||||
- diagnostic
|
- diagnostic
|
||||||
@@ -106,11 +104,6 @@ issues:
|
|||||||
linters:
|
linters:
|
||||||
- errcheck
|
- errcheck
|
||||||
|
|
||||||
# Allow long lines in test files
|
|
||||||
- path: _test\.go
|
|
||||||
linters:
|
|
||||||
- lll
|
|
||||||
|
|
||||||
# Exclude dupl from ONVIF API files - similar patterns are expected
|
# 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:
|
||||||
@@ -123,7 +116,6 @@ issues:
|
|||||||
|
|
||||||
max-issues-per-linter: 50
|
max-issues-per-linter: 50
|
||||||
max-same-issues: 10
|
max-same-issues: 10
|
||||||
exclude-use-default: false
|
|
||||||
|
|
||||||
output:
|
output:
|
||||||
print-issued-lines: true
|
print-issued-lines: true
|
||||||
|
|||||||
Reference in New Issue
Block a user