From df2d296ffcaa60634eda55d37be693bbcba30e38 Mon Sep 17 00:00:00 2001 From: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com> Date: Fri, 18 Sep 2020 17:24:01 +0800 Subject: [PATCH] Refine linter (#203) * Linter: remove gochecknoinits plugin * Linter: do NOT run some plugins on test files --- .github/linters/.golangci.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/linters/.golangci.yml b/.github/linters/.golangci.yml index 19167f21..589e45e1 100644 --- a/.github/linters/.golangci.yml +++ b/.github/linters/.golangci.yml @@ -4,6 +4,19 @@ run: skip-files: - generated.* +issues: + new: true + exclude-rules: + - path: _test\.go + linters: + - gocyclo + - errcheck + - dupl + - gosec + - goconst + - funlen + - lll + linters: enable: - bodyclose @@ -14,7 +27,6 @@ linters: - errcheck - exhaustive - funlen - - gochecknoinits - goconst - gocritic - gocyclo @@ -44,6 +56,3 @@ linters: - unused - varcheck - whitespace - -issues: - new: true \ No newline at end of file