Description
Recent work on #30436 improved the accuracy of the printf check greatly, and it started to uncover style issues previously undetected. For example, it detected problems like #49322, fmt.Println arg list ends with redundant new line
.
Even though I agree that this is a useful information in general, I want us to think if this type of check is severe enough to justify breaking existing tests when users upgrade go
to 1.18.
From @dmitshur's comment #49322 (comment)
It looks like it was added in the "initial commit" for vet in 2010, CL 3522041. Back then, it worked on *ast.BasicLit only. It's possible #30436 is a bigger improvement for other print checks like "possible formatting directive", and maybe it scales less well for the newline check.
Unlike in 2010, now vet
is part of go test
. Improved accuracy is great, but it looks to me some of the checks included in the initial commit may be more suitable for linters or gopls
.