You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docusaurus/docs/coverage-reporter/alternative-ways-of-running-coverage-reporter.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ The following sections list the alternative ways of running or installing Codacy
10
10
**If you're using Codacy Self-hosted** make sure that you use a Codacy Coverage Reporter version compatible with your Codacy instance.
11
11
:::
12
12
13
-
## Bash script (recommended) {#bash-script}
13
+
## Bash script (recommended) \{#bash-script\}
14
14
The recommended way to run the Codacy Coverage Reporter is by using the [self-contained bash script `get.sh`](https://github.com/codacy/codacy-coverage-reporter/blob/master/get.sh) that automatically downloads and runs the most recent version of the Codacy Coverage Reporter:
Before setting up Codacy to display code coverage metrics for your repository you must have tests and use tools to generate coverage reports for the source code files in your repository.
29
29
30
30
Consider the following when generating coverage reports for your repository:
@@ -129,15 +129,15 @@ If you're generating a report format that Codacy doesn't support yet, [contribut
129
129
-[<spanclass="skip-vale">danielpalme/ReportGenerator</span>](https://github.com/danielpalme/ReportGenerator): convert between different report formats
130
130
131
131
:::caution
132
-
Make sure that you [specify the language](uploading-coverage-in-advanced-scenarios.md#unsupported-languages) when uploading coverage for an unsupported language.
132
+
Make sure that you [specify the language](./uploading-coverage-in-advanced-scenarios.md#unsupported-languages) when uploading coverage for an unsupported language.
133
133
:::
134
134
135
135
As a last resort, you can also send the coverage data directly by calling one of the following Codacy API endpoints:
## 2. Uploading coverage data to Codacy\{#uploading-coverage\}
141
141
After having coverage reports set up for your repository, you must use the Codacy Coverage Reporter to upload them to Codacy. The recommended way to do this is by using a CI/CD platform that automatically runs tests, generates coverage, and then uses the Codacy Coverage Reporter to upload the coverage report information to Codacy.
142
142
143
143
:::caution
@@ -149,20 +149,20 @@ Please note that Codacy needs to receive coverage data for:
149
149
:::
150
150
151
151
:::note[Alternative ways of running the Codacy Coverage Reporter]
152
-
Codacy makes available [alternative ways to run the Codacy Coverage Reporter](alternative-ways-of-running-coverage-reporter.md), such as by installing the binary manually or by using Docker, a GitHub Action, or a CircleCI Orb.
152
+
Codacy makes available [alternative ways to run the Codacy Coverage Reporter](./alternative-ways-of-running-coverage-reporter), such as by installing the binary manually or by using Docker, a GitHub Action, or a CircleCI Orb.
153
153
154
-
However, the instructions on this page assume that you'll run the recommended [self-contained bash script `get.sh`](alternative-ways-of-running-coverage-reporter.md#bash-script) to automatically download and run the most recent version of the Codacy Coverage Reporter.
154
+
However, the instructions on this page assume that you'll run the recommended [self-contained bash script `get.sh`](./alternative-ways-of-running-coverage-reporter#bash-script) to automatically download and run the most recent version of the Codacy Coverage Reporter.
155
155
156
156
:::
157
157
158
158
1. Set up an API token to allow Codacy Coverage Reporter to authenticate on Codacy:
159
-
- **If you're setting up coverage for one repository**, [obtain a repository API token](../codacy-api/api-tokens.md#repository-api-tokens) and set the following environment variable to specify your repository API token:
159
+
-**If you're setting up coverage for one repository**, [obtain a repository API token](../codacy-api/api-tokens#repository-api-tokens) and set the following environment variable to specify your repository API token:
160
160
161
161
```bash
162
162
export CODACY_PROJECT_TOKEN=<your repository API token>
163
163
```
164
164
165
-
- **If you're setting up and automating coverage for multiple repositories**, [obtain an account API Token](../codacy-api/api-tokens.md#account-api-tokens) and set the following environment variables:
165
+
-**If you're setting up and automating coverage for multiple repositories**, [obtain an account API Token](../codacy-api/api-tokens#account-api-tokens) and set the following environment variables:
166
166
167
167
-**CODACY_API_TOKEN:** Your account API token.
168
168
@@ -206,7 +206,7 @@ However, the instructions on this page assume that you'll run the recommended [s
206
206
Be sure to also check the [instructions for more advanced scenarios](uploading-coverage-in-advanced-scenarios.md) while uploading the coverage data to Codacy, such as when running parallel tests, using monorepos, or testing source code in multiple or unsupported languages.
207
207
:::
208
208
209
-
## 3. Validating that the coverage setup is complete
209
+
## 3. Validating that the coverage setup is complete\{#validating-coverage\}
210
210
Codacy displays the code coverage in each branch, as well as the evolution of code coverage between commits and the code coverage variation introduced by pull requests.
211
211
212
212
Because of this, to ensure that all code coverage metrics are available on Codacy, you must have successfully uploaded coverage data and analyzed:
@@ -237,7 +237,7 @@ Follow these instructions to validate that your coverage setup is working correc
237
237
238
238
If there are commits with a status different from **Processed**, please follow the troubleshooting instructions for the corresponding error status and click the button **Test integration** to display any new coverage reports uploaded to Codacy.
239
239
240
-
### Commit not found
240
+
### Commit not found\{#status-commit-not-found\}
241
241
Codacy doesn't have information about the commit associated with the coverage data.
242
242
243
243
<table>
@@ -272,7 +272,7 @@ Follow these instructions to validate that your coverage setup is working correc
272
272
</tbody>
273
273
</table>
274
274
275
-
### Branch not enabled
275
+
### Branch not enabled\{#status-branch-not-enabled\}
276
276
The commit associated with the coverage data doesn't belong to any branch that Codacy is analyzing.
277
277
278
278
<table>
@@ -307,7 +307,7 @@ Follow these instructions to validate that your coverage setup is working correc
307
307
</tbody>
308
308
</table>
309
309
310
-
### Commit not analyzed
310
+
### Commit not analyzed\{#status-commit-not-analyzed\}
311
311
Due to technical limitations, Codacy only reports coverage for a commit after successfully completing the static code analysis of that commit.
312
312
313
313
<table>
@@ -335,7 +335,7 @@ Follow these instructions to validate that your coverage setup is working correc
335
335
Codacy didn't analyze the commit on a private repository because the committer doesn't belong to the Codacy organization.
336
336
</td>
337
337
<td>
338
-
Make sure that you <a href="../organizations/managing-people/#adding-people">add all committers to your Codacy organization</a>.
338
+
Make sure that you <ahref="../organizations/managing-people#adding-people">add all committers to your Codacy organization</a>.
339
339
</td>
340
340
</tr>
341
341
<tr>
@@ -365,7 +365,7 @@ Follow these instructions to validate that your coverage setup is working correc
365
365
</tbody>
366
366
</table>
367
367
368
-
### Final report not sent
368
+
### Final report not sent\{#status-final-report-not-sent\}
369
369
Codacy is waiting to receive more coverage data before reporting the coverage for a commit.
370
370
371
371
<table>
@@ -391,7 +391,7 @@ Follow these instructions to validate that your coverage setup is working correc
391
391
</tbody>
392
392
</table>
393
393
394
-
### Pending
394
+
### Pending\{#status-pending\}
395
395
Codacy is waiting to receive valid coverage data for the files in your repository.
396
396
397
397
<table>
@@ -448,7 +448,7 @@ Follow these instructions to validate that your coverage setup is working correc
448
448
449
449

450
450
451
-
Click **View logs** on a pull request detail page to see the SHA-1 hashes of the commits that are missing coverage data. If you have many open pull requests, you can also use a script to [identify if any pull requests are missing coverage data](../codacy-api/examples/identifying-commits-without-coverage-data.md).
451
+
Click **View logs** on a pull request detail page to see the SHA-1 hashes of the commits that are missing coverage data. If you have many open pull requests, you can also use a script to [identify if any pull requests are missing coverage data](../codacy-api/examples/identifying-commits-without-coverage-data).
452
452
453
453

454
454
@@ -466,5 +466,5 @@ If you need help setting up coverage on your repository please contact us at [su
466
466
467
467
## See also
468
468
469
-
- [Identifying commits without coverage data](../codacy-api/examples/identifying-commits-without-coverage-data.md)
470
-
- [Why does Codacy show unexpected coverage changes?](../faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.md)
469
+
-[Identifying commits without coverage data](../codacy-api/examples/identifying-commits-without-coverage-data)
470
+
-[Why does Codacy show unexpected coverage changes?](../faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes)
Copy file name to clipboardExpand all lines: docusaurus/docs/coverage-reporter/troubleshooting-coverage-cli-issues.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,15 +19,15 @@ The sections below provide instructions or workarounds to overcome common issues
19
19
20
20
## Can't guess any report due to no matching
21
21
22
-
Codacy Coverage Reporter automatically searches for coverage reports matching the [file name conventions for supported formats](index.md#generating-coverage).
22
+
Codacy Coverage Reporter automatically searches for coverage reports matching the [file name conventions for supported formats](./index.md#generating-coverage).
23
23
24
24
However, if Codacy Coverage Reporter doesn't find your coverage report, you can explicitly define the report file name with the flag `-r`. For example:
Starting on version [13.0.0](https://github.com/codacy/codacy-coverage-reporter/releases/tag/13.0.0) the `get.sh` script automatically validates the checksum of the downloaded Codacy Coverage Reporter binary. This requires having either the `sha512sum` or `shasum` command on the operating system where you're running the script.
32
32
33
33
If you're getting this error while uploading your coverage data to Codacy, install the correct version of `sha512sum` or `shasum` for the operating system that you're using.
@@ -38,7 +38,7 @@ You can also skip validating the checksum of the binary by defining the followin
The Codacy Coverage Reporter automatically detects the SHA-1 hash of the current commit to associate with the coverage data when you're using one of the following CI/CD platforms:
43
43
44
44
- <spanclass="skip-vale">Appveyor</span>
@@ -99,7 +99,7 @@ If you get a `com.fasterxml.jackson.core.JsonParseException` error while uploadi
99
99
100
100
There are some ways you can solve this:
101
101
102
-
- Split your coverage reports into smaller files and [upload them to Codacy one at a time](../uploading-coverage-in-advanced-scenarios/#multiple-reports).
102
+
- Split your coverage reports into smaller files and [upload them to Codacy one at a time](./uploading-coverage-in-advanced-scenarios#multiple-reports).
103
103
104
104
-**If you're using dotCover to generate coverage reports for your C# projects**, you should [exclude <spanclass="skip-vale">xUnit</span> files](https://www.jetbrains.com/help/dotcover/Running_Coverage_Analysis_from_the_Command_LIne.html#filters_cmd) from the coverage analysis as follows:
105
105
@@ -128,7 +128,7 @@ Make sure that your coverage report isn't empty and that it includes coverage da
128
128
If you upload multiple coverage reports and at least one contains valid data, the Codacy Coverage Reporter uploads the valid reports and ignores the invalid ones.
129
129
:::
130
130
131
-
## Report generated an empty result while uploading C# coverage data {#detailedxml}
131
+
## Report generated an empty result while uploading C# coverage data \{#detailedxml\}
132
132
If you're using <spanclass="skip-vale">dotCover</span> to generate coverage reports for your C# projects, you must use the <spanclass="skip-vale">dotCover</span> detailedXML report format as follows:
Copy file name to clipboardExpand all lines: docusaurus/docs/coverage-reporter/uploading-coverage-in-advanced-scenarios.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ description: Instructions on how to use the Codacy Coverage Reporter to upload c
6
6
7
7
The following sections include instructions on how to use the Codacy Coverage Reporter to upload coverage data in more advanced scenarios.
8
8
9
-
## Uploading multiple coverage reports for the same language {#multiple-reports}
9
+
## Uploading multiple coverage reports for the same language \{#multiple-reports\}
10
10
If your test suite is split into different modules or runs in parallel, you must upload multiple coverage reports for the same language either at once or in sequence.
11
11
12
12
Alternatively, consider merging multiple coverage reports before uploading them to Codacy. Most coverage tools support merging or aggregating coverage data. For example, use the [merge mojo for JaCoCo](http://www.eclemma.org/jacoco/trunk/doc/merge-mojo.html).
@@ -15,7 +15,7 @@ Alternatively, consider merging multiple coverage reports before uploading them
15
15
If one or more coverage reports mark a line as covered multiple times, Codacy counts it as a single covered line when calculating coverage.
16
16
:::
17
17
18
-
### Uploading all reports at once {#multiple-reports-once}
18
+
### Uploading all reports at once \{#multiple-reports-once\}
19
19
Upload multiple partial coverage reports with a single command by specifying each report with the flag `-r`. For example:
0 commit comments