fix: remove unsupported issues section from golangci-lint v2.x configs
The golangci-lint v2.8.0 schema validation rejected all properties in the issues section: - exclude-use-default - exclude-dirs - exclude-files - exclude - max-issues-per-linter - max-same-issues Solution: Removed the entire issues section from both config files. Linter behavior is now controlled exclusively through linters.settings, which is properly configured for govet, errcheck, gosec, gocritic, etc. Changes to backend/.golangci-fast.yml and backend/.golangci.yml: - Removed issues section entirely (v2.x schema incompatible) - Retained all linter-specific settings under linters.settings - Linters will run with their configured settings and default behaviors This resolves the jsonschema validation error: "additional properties ... not allowed" Fixes: #666 (golangci-lint v2.x schema validation)
This commit is contained in:
@@ -31,13 +31,3 @@ linters:
|
||||
- G501 # Blacklisted import crypto/md5
|
||||
- G502 # Blacklisted import crypto/des
|
||||
- G503 # Blacklisted import crypto/rc4
|
||||
|
||||
issues:
|
||||
exclude-use-default: false
|
||||
exclude-dirs:
|
||||
- vendor
|
||||
exclude-files:
|
||||
- ".*\\.gen\\.go$"
|
||||
exclude:
|
||||
# Allow test-specific patterns
|
||||
- 'Error return value of `.*(json\.Unmarshal|SetPassword|CreateProvider).*` is not checked'
|
||||
|
||||
@@ -55,18 +55,3 @@ linters:
|
||||
- (*database/sql.Rows).Close
|
||||
- (gorm.io/gorm.Migrator).DropTable
|
||||
- (*net/http.Response.Body).Close
|
||||
|
||||
issues:
|
||||
exclude-use-default: false
|
||||
exclude:
|
||||
# Gosec exclusions - be specific to avoid hiding real issues
|
||||
# G104: Ignoring return values - already checked by errcheck
|
||||
- "G104:"
|
||||
# Allow shadow warnings in specific patterns
|
||||
- "shadows declaration"
|
||||
exclude-dirs:
|
||||
- vendor
|
||||
exclude-files:
|
||||
- ".*_test\\.go$" # Test-specific exclusions handled via patterns
|
||||
max-issues-per-linter: 0
|
||||
max-same-issues: 0
|
||||
|
||||
Reference in New Issue
Block a user