fix up golangci-lint

dependabot/go_modules/modernc.org/sqlite-1.37.0
Joe Chen 2025-04-01 22:04:46 -04:00
parent 0885eb8f1c
commit 5a60b89b92
2 changed files with 35 additions and 24 deletions

View File

@ -52,7 +52,7 @@ jobs:
exit 1 exit 1
fi fi
- name: Run golangci-lint - name: Run golangci-lint
uses: golangci/golangci-lint-action@v4 uses: golangci/golangci-lint-action@v7
with: with:
version: latest version: latest
args: --timeout=30m args: --timeout=30m

View File

@ -1,29 +1,40 @@
linters-settings: version: "2"
staticcheck: linters:
checks: [ enable:
"all", - nakedret
"-SA1019" # There are valid use cases of strings.Title - rowserrcheck
] - unconvert
nakedret: - unparam
max-func-lines: 0 # Disallow any unnamed return statement settings:
govet: govet:
disable: disable:
# printf: non-constant format string in call to fmt.Errorf (govet) # printf: non-constant format string in call to fmt.Errorf (govet)
# showing up since golangci-lint version 1.60.1 # showing up since golangci-lint version 1.60.1
- printf - printf
staticcheck:
linters: checks:
- -SA1019 # There are valid use cases of strings.Title
- all
nakedret:
max-func-lines: 0 # Disallow any unnamed return statement
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable: enable:
- unused
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- nakedret
- gofmt - gofmt
- rowserrcheck
- unconvert
- goimports - goimports
- unparam exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$