From d62cc356356cf609112cecd3c42b54bdfeb3bdb6 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sun, 8 Feb 2026 07:42:20 +0000 Subject: [PATCH] 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) --- backend/.golangci-fast.yml | 10 ---------- backend/.golangci.yml | 15 --------------- 2 files changed, 25 deletions(-) diff --git a/backend/.golangci-fast.yml b/backend/.golangci-fast.yml index 53ffd53f..e9b54d63 100644 --- a/backend/.golangci-fast.yml +++ b/backend/.golangci-fast.yml @@ -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' diff --git a/backend/.golangci.yml b/backend/.golangci.yml index bfb43f68..7efc1fd6 100644 --- a/backend/.golangci.yml +++ b/backend/.golangci.yml @@ -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