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

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
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@griesemer
Copy link
Contributor

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 The path to resolution is known, but the work has not been done. 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
Copy link
Contributor Author

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

@griesemer griesemer modified the milestones: Go1.13, Go1.14 May 6, 2019
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants