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/cover: "comments are out of order" error on code that doesn't have a go: comment directive. #22309

aphistic opened this issue Oct 17, 2017 · 2 comments


Copy link

aphistic commented Oct 17, 2017

What version of Go are you using (go version)?

go version devel +58cf881c1c Tue Oct 17 17:00:15 2017 +0000 linux/amd64
(go tip on Travis CI)

Does this issue reproduce with the latest release?

It's currently happening on the version of go tip running on Travis CI

What operating system and processor architecture are you using (go env)?

Ubuntu 14.04.5 LTS on x86_64 (running on Travis CI)

What did you do?

I just made an update to a library of mine that I have building on Travis CI against go tip and it just failed with the following error:

2017/10/17 18:03:48 comments are out of order. /home/travis/gopath/src/ was before -.

The file it's mentioning hasn't changed in 2 months and I can't decipher what the error actually means in this context. The build itself is at The code in question is at

I already commented on the PR that seems to have committed the code I'm running into:

What did you expect to see?

A successful coverage run.

What did you see instead?

The error mentioned above.

Copy link

Change mentions this issue: cmd/cover: don't try to attach directives to synthetic decls

Copy link

+1 having this same issue

@golang golang locked and limited conversation to collaborators Oct 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

4 participants