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

go/printer, gofmt: line directives specifying columns must stay in place relative to next token #24326

Open
griesemer opened this Issue Mar 9, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@griesemer
Contributor

griesemer commented Mar 9, 2018

gofmt changes the code

package p
/*line foo:10:12*/func g() /*line :20:13*/{}

to

package p

/*line foo:10:12*/
func g()/*line :20:13*/ {}

which changes the positions of some tokens. Generally, gofmt changes positions, but in the case of line directives specifying specific line and column values we want those values to remain stable.

See also #22662, #24143, and #24183.

@griesemer griesemer added the NeedsFix label Mar 9, 2018

@griesemer griesemer added this to the Go1.11 milestone Mar 9, 2018

@griesemer griesemer self-assigned this Mar 9, 2018

@griesemer griesemer modified the milestones: Go1.11, Go1.12 Jun 27, 2018

@griesemer griesemer modified the milestones: Go1.12, Go1.13 Oct 24, 2018

@griesemer

This comment has been minimized.

Contributor

griesemer commented Oct 24, 2018

Moving to 1.13. No urgent need has come up for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment