Uploading report from multiple modules of the same language

I have a multimodule java stack. Can I publish reports to deepsource from the stack like this?
./bin/deepsource report --analyzer test-coverage --key java --value-file ./module1/target/site/jacoco/jacoco.xml
./bin/deepsource report --analyzer test-coverage --key java --value-file ./module2/target/site/jacoco/jacoco.xml
./bin/deepsource report --analyzer test-coverage --key java --value-file ./module3/target/site/jacoco/jacoco.xml

Here module1, module2, module3 are the various reports under the same java project.

How does deepsource publish these reports in the console?

  1. Will it aggregate all the issues?
  2. Will it list aggregated values for Line coverage, Composite Coverage etc under metrics or will it take the latest uploaded report and overwrite the rest?
  3. What would you advise to do - publish individual reports from each module and let deepsource handle the aggregation or perform the aggregation from our end and publish a single aggregated report (say using jacoco report-aggregate plugins or clover)
  4. If deepsource can perform aggregation, I would like to know if it would highlight aggregated entries everywhere - Issues section, Metrics section, corresponding graphs etc

Going on the same lines, I have uploaded multiple reports for a stack and now I want to remove all the results in deepsource (like bring it to a clean slate) and publish a new report. How can I do that?

Yes, DeepSource will aggregate the reports, and report the issues and metrics according to the aggregated report.

Using jacoco-aggregate or sending 3 separate reports should behave identically, and you can use whichever is more convenient for your workflow.

Ideally you should have to do nothing in the case of publishing more reports in your CI pipeline, as we will automatically hide stale test coverage issues and show the correct metrics as well.

However, if you want to get a clean slate for your test coverage issues, once you have made a commit on the default branch and pushed the correct set of reports on that commit, you can Deactivate and Re-activate your repository, and that will ensure that the issues that show up on your dashboard correspond only to the latest commit on the default branch.

If you face any issues with the above, please let us know.