Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Feature request: use line number + byte offset to highlight errors #1572

Closed
dhowden opened this issue Mar 10, 2018 · 3 comments
Closed

Feature request: use line number + byte offset to highlight errors #1572

dhowden opened this issue Mar 10, 2018 · 3 comments

Comments

@dhowden
Copy link
Contributor

dhowden commented Mar 10, 2018

It would be great if the error highlighting would begin at the byte offset reported by the compiler (since go 1.9:golang/go#10324).

@dhowden
Copy link
Contributor Author

dhowden commented Mar 10, 2018

So it looks like the correct information is making it in, but just not being correctly passed to vscode to render: https://github.com/Microsoft/vscode-go/blob/master/src/goLiveErrors.ts#L87

After some digging I think https://github.com/Microsoft/vscode-go/blob/230e7bc3b535b1434492d93682e429289402b87c/src/util.ts#L648 and the processes that use it, need to be updated to support columns.

Will try to make a pull request for this.

@dhowden
Copy link
Contributor Author

dhowden commented Mar 15, 2018

Closing as this has been merged.

Note: go1.10 is known to report some counter-intuitive column locations for certain errors (for instance golang/go#24339, which has been fixed and will be released in go1.11).

@dhowden dhowden closed this as completed Mar 15, 2018
@ramya-rao-a
Copy link
Contributor

This feature is now available in the latest update (0.6.78) to the Go extension.

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants