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
Assignees
Milestone

Comments

@griesemer
Copy link
Contributor

@griesemer griesemer commented Feb 11, 2012

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 robpike commented Feb 11, 2012

Comment 1:

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

@rsc
Copy link
Contributor

@rsc rsc commented Feb 12, 2012

Comment 2:

Should suffice to just print a \n before every //line comment.
@griesemer
Copy link
Contributor Author

@griesemer griesemer commented Feb 13, 2012

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
@rsc rsc removed priority-go1 labels 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
Linked pull requests

Successfully merging a pull request may close this issue.

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