Fix: Update .golangci.yml to v2 schema
- Add version: "2" field - Move linter settings to linters.settings (v2 structure) - Move exclusions to linters.exclusions (v2 structure) - Keep all existing linter configurations and rules - Fixes CI failures from golangci-lint v2 schema validation This makes PR #86 (version pinning) unnecessary.
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
version: "2"
|
version: "2"
|
||||||
|
|
||||||
run:
|
run:
|
||||||
|
timeout: 5m
|
||||||
tests: true
|
tests: true
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
|
default: standard
|
||||||
|
|
||||||
enable:
|
enable:
|
||||||
- dupl
|
- dupl
|
||||||
- goconst
|
- goconst
|
||||||
@@ -11,6 +16,7 @@ linters:
|
|||||||
- revive
|
- revive
|
||||||
- unconvert
|
- unconvert
|
||||||
- unparam
|
- unparam
|
||||||
|
|
||||||
settings:
|
settings:
|
||||||
dupl:
|
dupl:
|
||||||
threshold: 100
|
threshold: 100
|
||||||
@@ -32,20 +38,20 @@ linters:
|
|||||||
rules:
|
rules:
|
||||||
- name: var-naming
|
- name: var-naming
|
||||||
- name: exported
|
- name: exported
|
||||||
|
|
||||||
exclusions:
|
exclusions:
|
||||||
generated: lax
|
generated: lax
|
||||||
presets:
|
paths:
|
||||||
- comments
|
- third_party$
|
||||||
- common-false-positives
|
- builtin$
|
||||||
- legacy
|
- examples$
|
||||||
- std-error-handling
|
|
||||||
rules:
|
rules:
|
||||||
- linters:
|
- path: _test\.go
|
||||||
|
linters:
|
||||||
- dupl
|
- dupl
|
||||||
- errcheck
|
- errcheck
|
||||||
- goconst
|
- goconst
|
||||||
- gocyclo
|
- gocyclo
|
||||||
path: _test\.go
|
|
||||||
- path: (.+)\.go$
|
- path: (.+)\.go$
|
||||||
text: Error return value.*\.Close.*is not checked
|
text: Error return value.*\.Close.*is not checked
|
||||||
- path: (.+)\.go$
|
- path: (.+)\.go$
|
||||||
@@ -66,17 +72,7 @@ linters:
|
|||||||
text: G304.*file inclusion via variable
|
text: G304.*file inclusion via variable
|
||||||
- path: (.+)\.go$
|
- path: (.+)\.go$
|
||||||
text: 'G301: Expect directory permissions'
|
text: 'G301: Expect directory permissions'
|
||||||
paths:
|
|
||||||
- third_party$
|
|
||||||
- builtin$
|
|
||||||
- examples$
|
|
||||||
issues:
|
issues:
|
||||||
max-issues-per-linter: 0
|
max-issues-per-linter: 0
|
||||||
max-same-issues: 0
|
max-same-issues: 0
|
||||||
formatters:
|
|
||||||
exclusions:
|
|
||||||
generated: lax
|
|
||||||
paths:
|
|
||||||
- third_party$
|
|
||||||
- builtin$
|
|
||||||
- examples$
|
|
||||||
|
|||||||
Reference in New Issue
Block a user