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

Trigger go vet, gofmt, and goimports during the actions workflow. #10

Merged
merged 7 commits into from
May 29, 2024

Conversation

wbxyz
Copy link
Member

@wbxyz wbxyz commented May 28, 2024

I also had to fix a go vet finding in our benchmark generation.

wbxyz added 2 commits May 28, 2024 16:50
There was a loop variable being captured by a goroutine which might
change before the goroutine is executed.
@wbxyz wbxyz requested a review from msuozzo May 28, 2024 20:58
wbxyz added 2 commits May 28, 2024 17:09
These weren't caught yet because they fall under the "-s" simplify flag.

I borrowed the bash magic from digitalocean/godo@ea2c971
@wbxyz wbxyz changed the title Trigger go vet during the actions workflow. Trigger go vet and gofmt during the actions workflow. May 28, 2024
@wbxyz
Copy link
Member Author

wbxyz commented May 28, 2024

I added the gofmt changes here too, which also includes a cleanup commit.

run: go vet -v ./...

- name: Format
run: '[ ! "$(gofmt -s -l .)" ]'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's also use goimports which i think is just called with -l .

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@wbxyz wbxyz changed the title Trigger go vet and gofmt during the actions workflow. Trigger go vet, gofmt, and goimports during the actions workflow. May 29, 2024
@wbxyz wbxyz merged commit 08667b5 into google:main May 29, 2024
3 checks passed
@wbxyz wbxyz deleted the actions branch May 29, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants