fix(lint):err check rules and fix config

This commit is contained in:
verse91
2026-05-10 02:08:00 +07:00
parent e062c0a80d
commit 56e04be409
2 changed files with 39 additions and 28 deletions
+35 -27
View File
@@ -1,35 +1,43 @@
version: 2
version: "2"
run:
timeout: 5m
tests: true
timeout: 5m
tests: true
linters:
disable-all: true
enable:
- errcheck
- govet
- staticcheck
- errorlint
- errname
- bodyclose
- sqlclosecheck
- noctx
- ineffassign
- unconvert
- bidichk
linters-settings:
default: none
enable:
- errcheck
- govet
- staticcheck
- errorlint
- errname
- bodyclose
- sqlclosecheck
- noctx
- ineffassign
- unconvert
- bidichk
settings:
errcheck:
check-type-assertions: true
check-blank: true
check-type-assertions: true
check-blank: false
exclude-functions:
- fmt.Print
- fmt.Println
- fmt.Printf
- fmt.Fprint
- fmt.Fprintln
- fmt.Fprintf
govet:
enable-all: true
disable:
- fieldalignment
enable-all: true
disable:
- fieldalignment
exclusions:
rules:
- linters: [errcheck]
source: "^\\s*defer "
issues:
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0
max-issues-per-linter: 0
max-same-issues: 0