From d8bdf8360a1139cd6f1351199a72c872e0c002fc Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Tue, 31 Aug 2021 18:44:10 +0100 Subject: [PATCH 1/3] doc: How to upload the same coverage report for multiple languages DOCS-289 --- docs/index.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 86f645fa..d932715d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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: @@ -211,6 +211,20 @@ 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, . +### 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. From df407623816d97994e1f2ce7052ef238c1182990 Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Tue, 31 Aug 2021 18:44:37 +0100 Subject: [PATCH 2/3] style: Refactor instructions for consistency DOCS-289 --- docs/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index d932715d..91e73869 100644 --- a/docs/index.md +++ b/docs/index.md @@ -238,7 +238,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 \ From 8c40f8c45e4aee68c4994cab0d74b52f99bfd78b Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Thu, 2 Sep 2021 10:06:30 +0100 Subject: [PATCH 3/3] clean: Make example more compact by removing empty line --- docs/index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 91e73869..853929ab 100644 --- a/docs/index.md +++ b/docs/index.md @@ -220,7 +220,6 @@ To do this, upload the same report multiple times, specifying each different lan ```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 ```