From b2d7dc0dd5b5fd9086ff91e7ee8374f94e377d0b Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Fri, 24 Oct 2025 15:06:55 -0700 Subject: [PATCH] fix: golangci-lint config v1 format for compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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" --- .golangci.yml | 71 ++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 41 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index c5e4f3ba..f50ec39f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,3 @@ -version: "2" - run: timeout: 5m tests: true @@ -16,44 +14,35 @@ linters: - misspell - unconvert - unparam - settings: - dupl: - threshold: 100 - errcheck: - check-type-assertions: false - check-blank: false - exclude-files: - - ".*_test\\.go$" - exclude-functions: - - (*database/sql.DB).Close - - (*database/sql.Rows).Close - - (*database/sql.Tx).Rollback - goconst: - min-len: 3 - min-occurrences: 3 - gocyclo: - min-complexity: 15 - misspell: - locale: US - revive: - rules: - - name: var-naming - - name: exported + +linters-settings: + dupl: + threshold: 100 + errcheck: + check-type-assertions: false + check-blank: false + exclude-functions: + - (*database/sql.DB).Close + - (*database/sql.Rows).Close + - (*database/sql.Tx).Rollback + goconst: + min-len: 3 + min-occurrences: 3 + gocyclo: + min-complexity: 15 + misspell: + locale: US + revive: + rules: + - name: var-naming + - name: exported issues: - exclude-rules: - - path: _test\.go - linters: - - gosec - - revive - - text: "var-naming: avoid meaningless package names" - - text: "exported.*SQLiteStorage.*stutters" - - text: "G201: SQL string formatting" - - 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" + exclude: + - "var-naming: avoid meaningless package names" + - "exported.*SQLiteStorage.*stutters" + - "G201: SQL string formatting" + - "G301: Expect directory permissions" + - "G204: Subprocess launched" + - "G115: integer overflow conversion" + - "G304.*file inclusion via variable"