fix staticcheck issues

add staticcheck CI action

add staticcheck in Makefile

Signed-off-by: roywang <seiwy2010@gmail.com>
This commit is contained in:
roy wang
2021-01-28 17:43:45 +09:00
committed by roywang
parent af61a81828
commit 93ae8a9099
43 changed files with 136 additions and 115 deletions

View File

@@ -114,6 +114,25 @@ jobs:
- name: Run e2e tests
run: make e2e-test
staticcheck:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Cache Go Dependencies
uses: actions/cache@v2
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-pkg-
- name: Static Check
run: go run honnef.co/go/tools/cmd/staticcheck -- ./...
lint:
runs-on: ubuntu-20.04
@@ -164,4 +183,4 @@ jobs:
run: go install golang.org/x/tools/cmd/goimports && make fmt
- name: Check Diff
run: make check-diff
run: make check-diff