Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: initial module in golint presubmit check #818

Merged
merged 3 commits into from
Apr 18, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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