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,44 +14,35 @@ linters:
|
|||||||
- misspell
|
- misspell
|
||||||
- unconvert
|
- unconvert
|
||||||
- unparam
|
- unparam
|
||||||
settings:
|
|
||||||
dupl:
|
linters-settings:
|
||||||
threshold: 100
|
dupl:
|
||||||
errcheck:
|
threshold: 100
|
||||||
check-type-assertions: false
|
errcheck:
|
||||||
check-blank: false
|
check-type-assertions: false
|
||||||
exclude-files:
|
check-blank: false
|
||||||
- ".*_test\\.go$"
|
exclude-functions:
|
||||||
exclude-functions:
|
- (*database/sql.DB).Close
|
||||||
- (*database/sql.DB).Close
|
- (*database/sql.Rows).Close
|
||||||
- (*database/sql.Rows).Close
|
- (*database/sql.Tx).Rollback
|
||||||
- (*database/sql.Tx).Rollback
|
goconst:
|
||||||
goconst:
|
min-len: 3
|
||||||
min-len: 3
|
min-occurrences: 3
|
||||||
min-occurrences: 3
|
gocyclo:
|
||||||
gocyclo:
|
min-complexity: 15
|
||||||
min-complexity: 15
|
misspell:
|
||||||
misspell:
|
locale: US
|
||||||
locale: US
|
revive:
|
||||||
revive:
|
rules:
|
||||||
rules:
|
- name: var-naming
|
||||||
- name: var-naming
|
- 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