fix: golangci-lint config v1 format for compatibility
Changes: - Remove version: "2" (not needed and causes issues) - Rename linters.settings → linters-settings (v1 format) - Remove issues.exclude-rules (use simple exclude list) - Remove errcheck.exclude-files (not supported in v2.5.0) This fixes config validation errors: - "additional properties 'exclude-rules' not allowed" - "additional properties 'exclude-files' not allowed"
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
version: "2"
|
|
||||||
|
|
||||||
run:
|
run:
|
||||||
timeout: 5m
|
timeout: 5m
|
||||||
tests: true
|
tests: true
|
||||||
@@ -16,14 +14,13 @@ linters:
|
|||||||
- misspell
|
- misspell
|
||||||
- unconvert
|
- unconvert
|
||||||
- unparam
|
- unparam
|
||||||
settings:
|
|
||||||
|
linters-settings:
|
||||||
dupl:
|
dupl:
|
||||||
threshold: 100
|
threshold: 100
|
||||||
errcheck:
|
errcheck:
|
||||||
check-type-assertions: false
|
check-type-assertions: false
|
||||||
check-blank: false
|
check-blank: false
|
||||||
exclude-files:
|
|
||||||
- ".*_test\\.go$"
|
|
||||||
exclude-functions:
|
exclude-functions:
|
||||||
- (*database/sql.DB).Close
|
- (*database/sql.DB).Close
|
||||||
- (*database/sql.Rows).Close
|
- (*database/sql.Rows).Close
|
||||||
@@ -41,19 +38,11 @@ linters:
|
|||||||
- name: exported
|
- name: exported
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
exclude-rules:
|
exclude:
|
||||||
- path: _test\.go
|
- "var-naming: avoid meaningless package names"
|
||||||
linters:
|
- "exported.*SQLiteStorage.*stutters"
|
||||||
- gosec
|
- "G201: SQL string formatting"
|
||||||
- revive
|
- "G301: Expect directory permissions"
|
||||||
- text: "var-naming: avoid meaningless package names"
|
- "G204: Subprocess launched"
|
||||||
- text: "exported.*SQLiteStorage.*stutters"
|
- "G115: integer overflow conversion"
|
||||||
- text: "G201: SQL string formatting"
|
- "G304.*file inclusion via variable"
|
||||||
- text: "G301: Expect directory permissions"
|
|
||||||
- text: "G204: Subprocess launched"
|
|
||||||
- text: "G115: integer overflow conversion"
|
|
||||||
- text: "G304.*file inclusion via variable"
|
|
||||||
- path: (export|sync|init)\.go
|
|
||||||
text: "G302|G306.*0644"
|
|
||||||
- path: server\.go
|
|
||||||
text: "G302"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user