From 1a7e36a3693f1a1ff687df6d163975924ab7e798 Mon Sep 17 00:00:00 2001 From: Shane Sun <62788816+WaterLemons2k@users.noreply.github.com> Date: Wed, 12 Jun 2024 20:05:57 +0800 Subject: [PATCH] Fix new warnings from the linter upgrade Resolves #5585 The configuration has been verified with the command `golangci-lint config verify`. Signed-off-by: Shane Sun <62788816+WaterLemons2k@users.noreply.github.com> --- .golangci.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index a88d4b8c39f..df3208ffbb7 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -18,6 +18,13 @@ issues: text: "exitAfterDefer" - linters: [gocritic] text: "appendAssign" + exclude-dirs-use-default: false + exclude-dirs: + - mocks + - thrift-0.9.2 + - .*-gen + exclude-files: + - ".*.pb.go$" max-issues-per-linter: 0 max-same-issues: 0 @@ -136,10 +143,7 @@ linters-settings: - G107 - G404 - G601 - gosimple: - go: "1.21" govet: - check-shadowing: false enable-all: true disable: # There is rarely performance differences due to padding, @@ -235,10 +239,3 @@ linters-settings: run: go: "1.21" timeout: 20m - skip-dirs-use-default: false - skip-dirs: - - mocks - - thrift-0.9.2 - - .*-gen - skip-files: - - ".*.pb.go$"