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/gofmt: Removed semicolon not converted to end-of-line when adjacent to a block comment. #15137

Closed
h8liu opened this issue Apr 5, 2016 · 3 comments
Assignees
Milestone

Comments

@h8liu
Copy link

@h8liu h8liu commented Apr 5, 2016

Please answer these questions before submitting your issue. Thanks!

  • What version of Go are you using (go version)?
    1.6
  • What operating system and processor architecture are you using (go env)?
    darwin, amd64
  • What did you do?

Start with a.g:

package main

func f() {}
func main() {
    f(); /* something */ f()
}

go fmt, got

package main

func f() {}
func main() {
    f() /* something */ f()
}

Semicolon is removed, but endl is not inserted. The previously valid program is now broken.

  • What did you expect to see?
    The previously valid program remains valid.
  • What did you see instead?
    The previously valid program is now broken.
@h8liu h8liu changed the title cmd/gofmt: Semicolon not converted to end-of-line when before a block comment. cmd/gofmt: Removed semicolon not converted to end-of-line when before a block comment. Apr 5, 2016
@h8liu h8liu changed the title cmd/gofmt: Removed semicolon not converted to end-of-line when before a block comment. cmd/gofmt: Removed semicolon not converted to end-of-line when adjacent to a block comment. Apr 5, 2016
@griesemer griesemer self-assigned this Apr 5, 2016
@bradfitz bradfitz added this to the Go1.7 milestone Apr 7, 2016
@rsc rsc modified the milestones: Go1.8, Go1.7 May 17, 2016
@quentinmit quentinmit added the NeedsFix label Oct 6, 2016
@griesemer
Copy link
Contributor

@griesemer griesemer commented Nov 5, 2016

We have lived with this for a long time. Moving to Go1.8Maybe. (gofmt needs some serious love at some point).

@griesemer griesemer modified the milestones: Go1.8Maybe, Go1.8 Nov 5, 2016
@gopherbot
Copy link

@gopherbot gopherbot commented Nov 9, 2016

CL https://golang.org/cl/33016 mentions this issue.

@gopherbot gopherbot closed this in a0d2e96 Nov 10, 2016
@h8liu
Copy link
Author

@h8liu h8liu commented Nov 11, 2016

Thanks.

@golang golang locked and limited conversation to collaborators Nov 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.