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

cmd/vet: remove check for trailing newline in Println #18445

Closed
dsnet opened this issue Dec 28, 2016 · 1 comment
Closed

cmd/vet: remove check for trailing newline in Println #18445

dsnet opened this issue Dec 28, 2016 · 1 comment

Comments

@dsnet
Copy link
Member

dsnet commented Dec 28, 2016

One of the requirements for a vet check is correctness.

Currently, the vet tool has a check for trailing "\n" in fmt.Println. It doesn't seem like this is a matter of correctness, but rather of style. Should this check be moved from vet to lint?

\cc @robpike

@robpike
Copy link
Contributor

robpike commented Dec 28, 2016

I would like to leave it in, under the unwritten "venerable" criterion. It fits in well with the existing Printf checks, some others of which are also arguably less clearly wrong. But in practice, it does find errors, at least in my experience.

@rsc rsc closed this as completed Jan 4, 2017
@golang golang locked and limited conversation to collaborators Jan 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants