Fix golangci-lint config for v2+ format compatibility

This commit is contained in:
Steve Yegge
2025-10-24 00:14:57 -07:00
parent 0be4f2b062
commit 1220304a61

View File

@@ -1,12 +1,8 @@
version: "2"
run: run:
timeout: 5m timeout: 5m
tests: true tests: true
linters: linters:
default: standard
enable: enable:
- dupl - dupl
- goconst - goconst
@@ -17,62 +13,55 @@ linters:
- unconvert - unconvert
- unparam - unparam
settings: linters-settings:
dupl: dupl:
threshold: 100 threshold: 100
errcheck: errcheck:
check-type-assertions: true check-type-assertions: true
check-blank: false check-blank: false
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:
- name: var-naming
- name: exported
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
rules: rules:
- path: _test\.go - name: var-naming
linters: - name: exported
- dupl
- errcheck
- goconst
- gocyclo
- path: (.+)\.go$
text: Error return value.*\.Close.*is not checked
- path: (.+)\.go$
text: Error return value.*\.Rollback.*is not checked
- path: (.+)\.go$
text: Error return value.*\.RemoveAll.*is not checked
- path: (.+)\.go$
text: 'unused-parameter: parameter ''cmd'' seems to be unused'
- path: (.+)\.go$
text: 'unused-parameter: parameter ''args'' seems to be unused'
- path: (.+)\.go$
text: 'var-naming: avoid meaningless package names'
- path: (.+)\.go$
text: exported.*SQLiteStorage.*stutters
- path: (.+)\.go$
text: 'G201: SQL string formatting'
- path: (.+)\.go$
text: G304.*file inclusion via variable
- path: (.+)\.go$
text: 'G301: Expect directory permissions'
issues: issues:
max-issues-per-linter: 0 max-issues-per-linter: 0
max-same-issues: 0 max-same-issues: 0
exclude-rules:
- path: _test\.go
linters:
- dupl
- errcheck
- goconst
- gocyclo
- path: (.+)\.go$
text: Error return value.*\.Close.*is not checked
- path: (.+)\.go$
text: Error return value.*\.Rollback.*is not checked
- path: (.+)\.go$
text: Error return value.*\.RemoveAll.*is not checked
- path: (.+)\.go$
text: 'unused-parameter: parameter ''cmd'' seems to be unused'
- path: (.+)\.go$
text: 'unused-parameter: parameter ''args'' seems to be unused'
- path: (.+)\.go$
text: 'var-naming: avoid meaningless package names'
- path: (.+)\.go$
text: exported.*SQLiteStorage.*stutters
- path: (.+)\.go$
text: 'G201: SQL string formatting'
- path: (.+)\.go$
text: G304.*file inclusion via variable
- path: (.+)\.go$
text: 'G301: Expect directory permissions'