Skip to content

Commit 163a1f2

Browse files
Merge pull request #62 from codecov/spalmurray/update-readme
chore: Update README.md
2 parents 13cb8fd + 54f3440 commit 163a1f2

File tree

5 files changed

+33
-68
lines changed

5 files changed

+33
-68
lines changed

README.md

Lines changed: 33 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,49 @@
1-
![Overview slideshow](/media/4uLz6acpnhnd8SNe37rH.gif)
1+
# Codecov VS Code Extension
22

3-
Create, manage, and validate the codecov.yml right in VS Code with our latest extension. Make sure you don't commit any mistakes and accidentally change Codecov’s behavior due to an invalid configuration.
3+
Welcome to the Codecov VS Code extension! This tool can improve your development workflows by bringing Codecov line coverage and YAML validation directly into Visual Studio Code.
44

5-
**Key Features (for now 😉)**
5+
## Coverage Decorations
66

7-
* **PR Configuration in VS Code:** This extension empowers you to configure and enable Codecov directly within Visual Studio Code, eliminating the need for manual setups – ultimately saving you loads of time.
8-
* **Ease of Use:** The extension is designed for all users, regardless of their familiarity with Codecov or YAML files. You don't need to be an expert to ensure accurate and effective Codecov integration, we’ll help you along the way. Have a particularly complex setup? We’re [here to help](github.com/codecov/feedback).
9-
* **Real-time Assistance and Validation:** Tired of guesswork? Our extension offers autocomplete and real-time validation for your Codecov YAML file. It can detect errors in the YAML file before creating a pull request ensuring your configuration is spot-on.
7+
![Coverage demo](/media/coverage.png)
108

11-
![Validate configuration against Codecov servers](/media/PmGGVqo9jNHEE1yfYW9l.gif)
9+
This feature allows you to visualize coverage data directly in your code editor with line-by-line coverage decorations. Follow these steps to configure this feature:
1210

11+
1. Install the extension:
12+
- Open Visual Studio Code.
13+
- Navigate to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window.
14+
- Search for Codecov and install the extension.
15+
1. Generate a Codecov API key:
16+
- Go to the [Codecov app](https://app.codecov.io).
17+
- Log in to your account and navigate to your account settings.
18+
- Generate an API key under the Access tab.
19+
1. Enter the API key:
20+
- After installing the extension, you will be prompted to enter your Codecov API key in VS Code. Enter the key you generated in the previous step.
1321

22+
You should now start to see line coverage information in the left side gutter, making it easier to identify untested parts of your code, without having to leave your editor.
1423

15-
Here are some quick configurations to get you started:
24+
Note that as of today, this feature only pulls coverage data that has been uploaded to Codecov. It is not yet able to use local coverage files. We do understand this limitation and have plans to add support for local coverage in the future!
1625

17-
**Ease target coverage**
26+
### Customization Options
1827

19-
[Relax my coverage target](https://docs.codecov.com/docs/commit-status#threshold), because I have flaky tests
28+
In the extensions settings, we provide the following customization options for the coverage feature:
2029

30+
- Select Git provider: By default, this extension integrates with GitHub. For other providers, such as GitLab or Bitbucket, select your preferred Git provider within the settings. We also support the self-hosted/enterprise variants of each of these.
31+
- Custom colors: Tailor the appearance of coverage decorations by setting custom colors.
32+
- Self-hosted API URL: If you're using a self-hosted Codecov instance, you can customize the API URL within the extension settings to connect to your server.
2133

22-
```
23-
codecov.yml
34+
## Codecov YAML Validation
2435

25-
coverage:
26-
status:
27-
project:
28-
default:
29-
target: auto
30-
# adjust accordingly based on how flaky your tests are
31-
# this allows a 10% drop from the previous base commit coverage
32-
threshold: 10%
33-
```
36+
![YAML demo](/media/yaml.gif)
3437

38+
This feature provides validation for Codecov YAML configuration files, offering language server features and helpful hints for different fields. To set this up:
3539

36-
**Set non-blocking status checks**
40+
1. Install the extension:
41+
- Follow the same instructions as in the line-by-line coverage setup to install the Codecov extension.
42+
1. Create or navigate to a codecov.yml file
43+
1. Start editing or validate:
44+
- Begin editing the codecov.yml file to take advantage of language server features like autocompletion and inline hints.
45+
- Alternatively, press the Codecov icon in the top right corner of the VS Code window to validate the entire YAML file.
3746

38-
See status checks but [prevent them from blocking](https://docs.codecov.com/docs/commit-status#informational)
47+
## Having problems?
3948

40-
41-
```
42-
codecov.yml
43-
44-
coverage:
45-
status:
46-
project:
47-
default:
48-
informational: true
49-
patch:
50-
default:
51-
informational: true
52-
```
53-
54-
55-
**Ensure all code is covered**
56-
57-
Set blocking coverage so [that new code must be fully tested](https://docs.codecov.com/docs/commit-status#patch-status)
58-
59-
60-
```
61-
codecov.yml
62-
63-
coverage:
64-
status:
65-
patch:
66-
default:
67-
target: 100%
68-
```
69-
70-
71-
This is just the beginning of the Codecov VS Code extension. We plan to keep investing into the extension over time to provide even more of Codecov's functionality directly in your code editor. – if you have ideas to share, questions, or need help don’t hesitate to [let us know](https://github.com/codecov/feedback).
72-
73-
Get started with our Codecov VS Code extension and unlock a new level of convenience and accuracy in your code coverage setup. Install now.
74-
75-
76-
77-
**Troubleshooting**
78-
79-
Is the extension not working? VS Code might not be detecting Codecov files if a language matching the pattern has been set and is overriding detecting Codecov as a language provider.
80-
81-
![How to set Codecov as the language of a Codecov config file](/media/Codecov%20+%20VSCode%20(Troubleshoot).gif)
82-
83-
84-
If validation is still not working you may need to restart VS Code. If it is still broken you can [report the issue here](https://github.com/codecov/vscode/issues)
49+
If you run into issues with any of the extension's features, please don't hesitate to get in touch by [submitting an issue](https://github.com/codecov/vscode/issues). We will do our best to get back to you quickly!
-1.18 MB
Binary file not shown.

media/PmGGVqo9jNHEE1yfYW9l.gif

-1.26 MB
Binary file not shown.

media/coverage.png

420 KB
Loading

0 commit comments

Comments
 (0)