Skip to content

Commit 2bb58e6

Browse files
authored
Merge pull request #79 from codacy/add-partial-report-documentation
Add partial coverage report documentation
2 parents b4d4d4f + 3a4addc commit 2bb58e6

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,18 @@ codacy-coverage-reporter report -l Java -r coverage.xml
7373

7474
> Note: You should keep your API token well **protected**, as it grants owner permissions to your projects.
7575
76-
**Multiple coverage reports**
76+
**Multiple coverage reports for the same language**
7777

78-
If you have multiple modules generating multiple report files you need to merge them before invoking this reporter, since Codacy only receives one report per commit per language.
78+
In order to send multiple reports for the same language, you need to upload each report separately with the flag `--partial` and then notify Codacy, after all reports were sent, with the `final` command.
7979

80-
Most coverage tools support merge/aggregation, example: http://www.eclemma.org/jacoco/trunk/doc/merge-mojo.html
80+
***Example***
81+
1. `codacy-coverage-reporter report -l Java -r report1.xml --partial`
82+
1. `codacy-coverage-reporter report -l Java -r report2.xml --partial`
83+
1. `codacy-coverage-reporter final`
84+
85+
If you are sending reports with the partial flag for a certain language you should use it in all reports for that language to ensure the correct calculation of the coverage.
86+
87+
It might also be possible to merge the reports before uploading them to Codacy, since most coverage tools support merge/aggregation, example: http://www.eclemma.org/jacoco/trunk/doc/merge-mojo.html .
8188

8289
**Other Languages**
8390

0 commit comments

Comments
 (0)