-
Notifications
You must be signed in to change notification settings - Fork 90
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
docs(QUICKSTART.md): created QUICKSTART.md #369
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b0cca30
docs(QUICKSTART.md): crerated QUICKSTART.md
vxdguy 256e57a
Merge branch 'master' into quickstart-docs
ryanluker 29e0089
Merge branch 'master' into quickstart-docs
ryanluker 57fc877
Merge branch 'ryanluker:master' into quickstart-docs
vxdguy 8818ab3
Apply suggestions from code review
ryanluker 2794367
Merge branch 'master' into quickstart-docs
ryanluker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,258 @@ | ||
|
||
# Quickstart for VSCODE-CODE-COVERAGE | ||
|
||
**Summary**: This is the QUICKSTART.md document to help users get started with the `ryanluker.vscode-coverage-gutters` "*Coverage Gutters*" extension for VS Code. | ||
|
||
## Terminology | ||
|
||
*Coverage Gutters* depends uses two files. It's easy to get the files mixed up and we need to make sure that everone is on the same page when we talk about these files. | ||
|
||
<details> | ||
<summary>Coverage File</summary> | ||
|
||
----- | ||
|
||
* LCOV or XML file containing detailed coverage data | ||
ryanluker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
* *Coverage Gutters* supports LCOV, CLOVER, COBERTURA, and JACOCO coverage files | ||
|
||
* Generation of the coverage file is language specific and is beyond the scope of this extension. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe mention after this that they could look at the examples for scenarios on how to generate the coverage files. |
||
|
||
</details> | ||
|
||
<details> | ||
<summary>Coverage Report</summary> | ||
|
||
----- | ||
|
||
* HTML file(s) that provides a nice way to view coverage data. | ||
ryanluker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
* *Coverage Gutters* does **not** utilize this file. | ||
|
||
* Generation of the coverage report is language specific and beyond the scope of this extension. | ||
|
||
The extension assumes these two files are located somewhere in your workspace. There are settings (covered later) to let you customize where **Coverage Gutters** will look for both of these files. | ||
|
||
</details> | ||
|
||
## Requirements | ||
|
||
You need two extensions to get started. Installation via CLI or Quick Open works best since they use the extension ID to ensure the correct extension is installed. | ||
|
||
<details> | ||
<summary>Coverage Gutters - ryanluker.vscode-coverage-gutters</summary> | ||
|
||
----- | ||
|
||
1. CLI install | ||
|
||
* `code --install-extension ryanluker.vscode-coverage-gutters` | ||
|
||
2. Quick Open Install | ||
|
||
* `CTRL-P` `ext install ryanluker.vscode-coverage-gutters` | ||
|
||
3. Install | ||
|
||
* `CTRL-SHIFT-X` to go to Extensions | ||
|
||
* Search for `coverage gutters` | ||
|
||
* Install the extension by `ryanluker` | ||
|
||
![Extension search: Coverage Gutters](images/extension_search.png) | ||
|
||
</details> | ||
|
||
<details> | ||
<summary>Live Preview - ms-vscode.live-server</summary> | ||
|
||
----- | ||
|
||
1. CLI install | ||
|
||
* `code --install-extension ms-vscode.live-server` | ||
|
||
2. Quick Open Install | ||
|
||
* `CTRL-P` `ext install ms-vscode.live-server` | ||
|
||
3. GUI Install | ||
|
||
* `CTRL-SHIFT-X` to go to Extensions | ||
|
||
* Search for `live preview` | ||
|
||
* Install the extension by `Microsoft` | ||
|
||
![Extension search: Live Preview](images/exten_search_live_preview.png) | ||
|
||
</details> | ||
|
||
After the extensions are installed, you need to get your coverage files. | ||
|
||
<details> | ||
|
||
<summary>Code coverage file</summary> | ||
|
||
----- | ||
|
||
1. Support for the following coverage filenames: | ||
|
||
* `lcov.info` | ||
* `cov.xml` | ||
* `coverage.xml` | ||
* `jacoco.xml` | ||
* `coverage.cobertura.xml` | ||
|
||
2. Customizable file name. You may use any filename you like, but the file must be a Clover, Cobertura, Jacoco, or LCov format file. | ||
|
||
3. Generating a coverage file is language specific. | ||
|
||
</details> | ||
|
||
## Usage | ||
|
||
<details><summary>Generate your coverage file</summary> | ||
|
||
----- | ||
|
||
* *How* you generate your coverage file is language specific. | ||
|
||
* For example, in .NET the coverage file is generated through unit testing. | ||
|
||
</details> | ||
|
||
<details><summary>Generate your coverage report</summary> | ||
|
||
----- | ||
|
||
* Like the coverage file, generating the HTML report is language specific. | ||
|
||
* For example, in .NET there is a *ReportGenerator* utility. Other languages may generate the coverage report at the same time as the coverage file. | ||
|
||
</details> | ||
|
||
<details><summary>Activate code coverage indicators</summary> | ||
|
||
----- | ||
|
||
* Pressing `CTRL-SHIFT-7` will colorize the VS Code IDE. Coloring is transient; when the window becomes hidden it will reset and lose coloring. | ||
|
||
</details> | ||
|
||
<details><summary>Preview coverage report</summary> | ||
|
||
----- | ||
|
||
* Pressing `CTRL-SHIFT-6` will bring up a preview window with the coverage report. | ||
|
||
</details> | ||
|
||
## Settings | ||
|
||
<details><summary>Coverage Base Dir "coverage-gutters.coverageBaseDir"</summary> | ||
|
||
----- | ||
|
||
* Directory where the **coverage file** is located. | ||
|
||
* Default is "`**`" which is the entire workspace. | ||
|
||
* To prevent searching through the entire workspace, you can limit **coverage gutters* to a specific folder. | ||
|
||
</details> | ||
|
||
<details><summary>Coverage File Names "coverage-gutters.coverageFileNames"</summary> | ||
|
||
----- | ||
|
||
* JSON array of filenames that are coverage files. | ||
|
||
* Default is: | ||
|
||
```json | ||
[ | ||
"lcov.info", | ||
"cov.xml", | ||
"coverage.xml", | ||
"jacoco.xml", | ||
"coverage.cobertura.xml" | ||
] | ||
``` | ||
|
||
* If your coverage report filename isn't listed, this is where you can add it. | ||
|
||
</details> | ||
|
||
<details><summary>Coverage Report Filename `coverage-gutters.coverageReportFileName`</summary> | ||
|
||
----- | ||
|
||
* Points to the `index.htm[l]` of your coverage report. The is used for `CTRL-SHIFT-6` Preview Coverage Report function. Since it's possible to have multiple `index.htm[l]` files in web projects, this should explictly set, e.g. "`coverage/**/index.html`" | ||
|
||
</details> | ||
|
||
<details><summary>Show Gutter Coverage `coverage-gutters.showGutterCoverage`</summary> | ||
|
||
----- | ||
|
||
Enables the Green/Red markings in the gutter to indicate code coverage. | ||
|
||
Default is **Enabled** | ||
|
||
![Coverage in gutter](images/coverage_gutters.png) | ||
|
||
This is known to interfere with setting breakpoints from the GUI (clicking on gutters). Workarounds is to disable this setting and use `coverage-gutters.showLineCoverage`, or press `F9`the default key to set a breakpoint on the current line. | ||
|
||
</details> | ||
|
||
<details><summary>Show Line Coverage `coverage-gutters.showLineCoverage`</summary> | ||
|
||
----- | ||
|
||
Enables the Green/Red markings underneath each line to indicate code coverage. | ||
|
||
Default is **Disabled** | ||
|
||
![Coverage in gutter](images/coverage_lines.png) | ||
|
||
</details> | ||
|
||
## Troubleshooting | ||
|
||
<details><summary>Can't find coverage file</summary> | ||
|
||
----- | ||
|
||
1. Filename must be: | ||
|
||
```text | ||
lcov.info | ||
cov.xml | ||
coverage.xml | ||
jacoco.xml | ||
coverage.cobertura.xml | ||
``` | ||
|
||
If your coverage file is named something else, you can add it to the list of valid coverage filenamed by editing `coverage-gutters.coverageFileNames`. | ||
|
||
2. File must be in `coverage-gutters.coverageBaseDir` which defaults to "`**`" or any directory. | ||
|
||
By default every directory is recursively scanned for a matching filename. Coverage files can be found faster by pointing this setting to the directory containing the coverage file. There must be only one matching coverage file within the `coverage-gutters.coverageBaseDir` search folders. | ||
|
||
</details> | ||
|
||
<details><summary>Preview report not working</summary> | ||
|
||
----- | ||
|
||
1. File must be named `index.html` | ||
|
||
2. Point `coverage-gutters.coverageReportFileName` to the report's index file. | ||
|
||
3. Ensure that the `ext install ms-vscode.live-server` extension is installed. | ||
|
||
* `CTRL-P` `ext install ms-vscode.live-server` | ||
|
||
</details> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should link this document from the readme that is exposed on the vscode marketplace. (https://github.com/ryanluker/vscode-coverage-gutters/blob/master/README.md)