From 6781e23c3b93fd930d78645c2992aec9e0e036cc Mon Sep 17 00:00:00 2001 From: Boshi Lian Date: Mon, 4 Oct 2021 12:31:15 +0000 Subject: [PATCH] move lint to gh action --- .github/workflows/go.yml | 11 ++++------- lint.sh | 6 ------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c3ceb0ed..02113d68 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -26,22 +26,19 @@ jobs: - name: Dep run: | set -e - go version - go install golang.org/x/lint/golint - go install github.com/gordonklaus/ineffassign + + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 - name: Build run: | set -e - go build -tags pam -o sshpiperd + go build -o sshpiperd ./sshpiperd version working-directory: sshpiperd - - name: lint - run: ./lint.sh - - name: Test run: go test -v . working-directory: sshpiperd diff --git a/lint.sh b/lint.sh index 2d1e1525..e1483dd9 100755 --- a/lint.sh +++ b/lint.sh @@ -2,15 +2,9 @@ set -e -pkgs="./libpiper/... ./sshpiperd/..." - gofmt -s -l libpiper sshpiperd go vet ./... go fix ./... -for p in $pkgs; do - golint $p -done - ineffassign ./...