-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/analysis/passes/printf: regression in format type checks #28858
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
Comments
I tried to search whether this change was deliberate but couldn't find anything. It's possible it was deliberate. |
It appears that this was introduced in 98409a4 (cmd/vet: better align print warnings with fmt). |
This does look like a regression introduced by that commit of mine a while ago. Will have a look. |
Thanks for the report, @kevinburke. This turned out to uncover another batch of bugs in vet's printf checker, where it was fairly inconsistent with what fmt does. See https://go-review.googlesource.com/c/tools/+/149979. In its defense, |
Thanks for the quick fix, Daniel. |
OK - should we mark this as a release blocker? |
Certainly seems like something we can fix in 1.12 to me, but it's not a regression in tip, so I wouldn't call it a blocker. Will leave the decision to Alan. |
I agree with Daniel: not a regression, not a release blocker. Shouldn't be hard to fix though. |
Change https://golang.org/cl/152277 mentions this issue: |
The following code is incorrect - I meant to write
len(s)
nots
.In Go 1.10, running
go test
returns a vet error:However, in Go 1.11 and above,
go test
does not return an error - it instead returns:I added a repository to reproduce - you can see in the Travis CI build which fails on Go 1.10 but passes on Go 1.11 and tip. https://travis-ci.org/kevinburke/test-fmt-repro/builds/456666561
The text was updated successfully, but these errors were encountered: