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

Add support for coverage markup #143

Merged
merged 13 commits into from
Mar 8, 2016

Conversation

tampajohn
Copy link
Contributor

Adding coverage highlighting to vscode-go. Adds setting "go.coverageOnSave" and command for performing coverage for current package. Addresses some of the desires of #80.

@tecbot
Copy link

tecbot commented Dec 4, 2015

@tampajohn Awesome 👍

One thing what I found: If the cursor is on a tested line and I want to add a new line with new code, then the next line and all new following lines will have the same background color as the tested line (green or red). Would be better to reset the background color for the new line/code if possible.

@tampajohn
Copy link
Contributor Author

@tecbot Hmmmm, I'm not super sure where the best place to tie into this is... @lukehoban I know I could do something using registerOnTypeFormattingEditProvider, but that seems kinda invasive... do you know a good place to handle resetting coverage when a document is dirty?

@lukehoban
Copy link
Contributor

Depends a bit on what experience you want exactly.

You could try workspace.onDidChangeTextDocument which sends a notification when any open text document changes.

But do you think it makes sense to instead try to keep the coverage information around even after you make edits?

@tecbot
Copy link

tecbot commented Dec 8, 2015

+1 remove the coverage if start editing the code

@tampajohn
Copy link
Contributor Author

@tecbot Removing coverage for the file that's been edited, thanks for the onDidChangeTextDocument pointer @lukehoban

@rs
Copy link

rs commented Mar 5, 2016

What is the status of this PR? What’s missing for its merging?

@lukehoban lukehoban merged commit b7113b3 into microsoft:master Mar 8, 2016
@lukehoban
Copy link
Contributor

Finally got a chance to re-review this, and looks good.

I've merged this in now along with a few minor changes.

Thanks @tampajohn, and apologies for the 4 month delay 😄.

hyangah pushed a commit to hyangah/vscode-go-old that referenced this pull request Jun 12, 2020
…valuation

Watch expressions are repeated over and over again while the program is running, pausing, continuing, etc, and the result is always displayed and continuously refreshed under WATCH. Unlike other types of evaluations (e.g. in REPL, where one expression is evaluated at a time, and the error can be buried among logging messages), there is no advantage to also showing the same error in a pop-up box.

Fixes microsoft#143

Change-Id: I026955980d22e955e4af933bc68256dc320c3f56
GitHub-Last-Rev: 9a52492
GitHub-Pull-Request: golang/vscode-go#196
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/236999
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants