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

Add govet new format #144

Merged
merged 1 commit into from Mar 11, 2024
Merged

Add govet new format #144

merged 1 commit into from Mar 11, 2024

Conversation

seiyab
Copy link
Member

@seiyab seiyab commented Mar 5, 2024

Related issue: reviewdog/reviewdog#933

I've reproduced reviewdog/reviewdog#933. I found that reports from go vet is misparsed. In master branch:

$ echo "./main.go:7:2: fmt.Printf format %s has arg x of wrong type int" | go run ./cmd/errorformat -name=govet
./main.go:7|2| fmt.Printf format %s has arg x of wrong type int

Maybe it causes mismatch in filename so reviewdog doesn't report error.
Though I haven't investigate changelog, I guess that error format of go vet has changed. I added a new (?) format and leave old (?) one.

My environment:

$ go version
go version go1.21.1 darwin/arm64

Minimal reproduction:
run reviewdog on https://github.com/seiyab/repro/tree/43554945d9154c76a4266237492cfe83e707ee08/reviewdog-fixture

@seiyab
Copy link
Member Author

seiyab commented Mar 11, 2024

String() method of token.Position optionally appends column. And go vet prints it.
https://cs.opensource.google/go/go/+/refs/tags/go1.22.1:src/go/token/position.go;l=39-54

Copy link
Member

@haya14busa haya14busa left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!

@haya14busa haya14busa merged commit 739e471 into reviewdog:master Mar 11, 2024
5 checks passed
@review-dog
Copy link
Member

Hi, @seiyab! We merged your PR to reviewdog! 🐶
Thank you for your contribution! ✨

We just invited you to join the @reviewdog organization on GitHub.
Accept the invite by visiting https://github.com/orgs/reviewdog/invitation.
By joining the team, you'll be a part of reviewdog community and can help the maintenance of reviewdog.

Thanks again!

@seiyab seiyab deleted the update-govet branch March 11, 2024 06:21
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.

None yet

3 participants