Skip to content

Commit

Permalink
fix: initial module in golint presubmit check (#818)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanmar511 authored Apr 18, 2022
1 parent b781ad8 commit df1f28a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/ci2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,18 @@ jobs:
runs-on: ubuntu-latest
container: golang:latest
steps:
- run: gofmtdiff=$(gofmt -s -d .) && if [ -n "$gofmtdiff" ]; then printf 'gofmt -s found:\n%s\n' "$gofmtdiff" && exit 1; fi
- run: go get -u golang.org/x/lint/golint && golintlint=$($GOPATH/bin/golint ./...) && if [ -n "$golintlint" ]; then printf 'golint found:\n%s\n' "$golintlint" && exit 1; fi
- run: |
gofmtdiff=$(gofmt -s -d .)
if [ -n "$gofmtdiff" ]
then
printf 'gofmt -s found:\n%s\n' "$gofmtdiff" && exit 1;
fi
- run: |
go mod init tools
go get -u golang.org/x/lint/golint
go install golang.org/x/lint/golint
golintlint=$(golint ./...)
if [ -n "$golintlint" ]
then
printf 'golint found:\n%s\n' "$golintlint" && exit 1
fi

0 comments on commit df1f28a

Please sign in to comment.