Skip to content

Commit

Permalink
Merge pull request #348 from codacy/doc/single-report-multiple-langua…
Browse files Browse the repository at this point in the history
…ges-DOCS-289

doc: How to upload the same coverage report for multiple languages DOCS-289
  • Loading branch information
Paulo Ribeiro authored Sep 2, 2021
2 parents 5c4e85d + 8c40f8c commit 6125670
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ See the sections below for more advanced functionality, or [check the troublesho
### Uploading multiple coverage reports for the same language {: id="multiple-reports"}
If your test suite is split on different modules or runs in parallel, you will need to upload multiple coverage reports for the same language.
If your test suite is split on different modules or runs in parallel, you must upload multiple coverage reports for the same language.
To do this, specify multiple reports by repeating the flag `-r`. For example:
Expand Down Expand Up @@ -211,6 +211,19 @@ bash <(curl -Ls https://coverage.codacy.com/get.sh) report \
!!! tip
It might also be possible to merge the reports before uploading them to Codacy, since most coverage tools support merge/aggregation. For example, <http://www.eclemma.org/jacoco/trunk/doc/merge-mojo.html>.

### Uploading the same coverage report for multiple languages {: id="multiple-languages"}

If your test suite generates a single coverage report for more than one language, you must upload the same coverage report for each language.

To do this, upload the same report multiple times, specifying each different language with the flag `-l`. For example:

```bash
bash <(curl -Ls https://coverage.codacy.com/get.sh) report \
-l Javascript -r report.xml
bash <(curl -Ls https://coverage.codacy.com/get.sh) report \
-l TypeScript -r report.xml
```

### Submitting coverage for Golang

Codacy can't automatically detect Golang coverage report files because they don't have specific file names.
Expand All @@ -224,7 +237,9 @@ bash <(curl -Ls https://coverage.codacy.com/get.sh) report \
### Submitting coverage for unsupported languages
If your language is not in the list of supported languages, you can still send coverage to Codacy. You can do it by providing the correct language name with the flag `-l`, together with `--force-language`. For example:
If your language is not in the list of supported languages, you can still send coverage to Codacy.
To do this, provide the correct language with the flag `-l`, together with `--force-language`. For example:
```bash
bash <(curl -Ls https://coverage.codacy.com/get.sh) report \
Expand Down

0 comments on commit 6125670

Please sign in to comment.