Browse Source

add golangci to lint

Kslr 5 years ago
parent
commit
f624dd3249
2 changed files with 10 additions and 2 deletions
  1. 2 2
      .github/linters/.golangci.yml
  2. 8 0
      .github/workflows/linter.yml

+ 2 - 2
.github/linters/.golangci.yml

@@ -1,8 +1,8 @@
 run:
 run:
-  modules-download-mode: vendor
   skip-dirs:
   skip-dirs:
-    - generated.*
     - external
     - external
+  skip-files:
+    - generated.*
 
 
 linters:
 linters:
   enable:
   enable:

+ 8 - 0
.github/workflows/linter.yml

@@ -57,3 +57,11 @@ jobs:
             echo -e "\033[0;31m$filesNeedToFormat\033[0m"
             echo -e "\033[0;31m$filesNeedToFormat\033[0m"
             exit 1
             exit 1
           fi
           fi
+
+      - name: golangci-lint
+        if: ${{ always() }}
+        uses: golangci/golangci-lint-action@v2
+        with:
+          version: v1.31
+          only-new-issues: true
+          args: --config=.github/linters/.golangci.yml