Browse Source

Refine linter (#203)

* Linter: remove gochecknoinits plugin
* Linter: do NOT run some plugins on test files
Loyalsoldier 5 years ago
parent
commit
df2d296ffc
1 changed files with 13 additions and 4 deletions
  1. 13 4
      .github/linters/.golangci.yml

+ 13 - 4
.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