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: valid //line comments must remain at the beginning of the line #2990

Closed
griesemer opened this issue Feb 11, 2012 · 3 comments
Closed
Milestone

Comments

@griesemer
Copy link
Contributor

What steps will reproduce the problem?

gofmt $GOROOT/test/dwarf/linedirectives.go 


What is the expected output? What do you see instead?

Most line directives appear correct, but some are indented incorrectly.


This particular file also causes the gofmt long test to fail:

go test cmd/gofmt
--- FAIL: TestAll (18.53 seconds)
    long_test.go:86: /Users/gri/go/test/dwarf/linedirectives.go: not idempotent
FAIL
FAIL    cmd/gofmt   18.589s

(Albeit there are other known cases that cause gofmt to not be idempotent).
@robpike
Copy link
Contributor

robpike commented Feb 11, 2012

Comment 1:

Labels changed: added priority-go1, go1-must, removed priority-triage.

@rsc
Copy link
Contributor

rsc commented Feb 12, 2012

Comment 2:

Should suffice to just print a \n before every //line comment.

@griesemer
Copy link
Contributor Author

Comment 3:

This issue was closed by revision 28ffb38.

Status changed to Fixed.

@griesemer griesemer self-assigned this Feb 13, 2012
@rsc rsc added this to the Go1 milestone Apr 10, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
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