From d84f3c0f925951c6469b2598fb05da2df81990c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?xinfan=2Ewu=28=E5=90=B4=E6=AD=86=E5=B8=86=29?= Date: Sun, 10 Nov 2024 13:06:57 +0800 Subject: [PATCH] feat:add more linter --- .golangci.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 1180b7084..5ed45a559 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -17,7 +17,7 @@ linters-settings: govet: - check-shadowing: false + check-shadowing: true golint: min-confidence: 0 gocyclo: @@ -56,6 +56,25 @@ linters: - staticcheck - ineffassign - misspell + - typecheck + - varcheck + - unused + - structcheck + - deadcode + - gosimple + - errcheck + - asciicheck + - bodyclose + - copyloopvar + - rowserrcheck + - makezero + - durationcheck + - prealloc + - predeclared + - revive + - lll + - intrange + run: skip-dirs: @@ -70,6 +89,12 @@ issues: - linters: - staticcheck text: "SA1019:" + - path: _test\.go + linters: + - errcheck + - gosec + - rowserrcheck + - makezero # golangci.com configuration # https://github.com/golangci/golangci/wiki/Configuration