- Community Edition Version 10.2
I have a repository with several components mainly python and two of them in ts/js.
I have unit-testing for each component that uses a docker-compose to perform testing and then leaves coverage files.
My first choice have been to use a multimodule project but I am encountering some issues. My coverage reports are under a ‘coverage_xml_report’ dir
├── component1 │ ├── coverage_xml_report ├── component2 │ ├── coverage_xml_report
the coverage reports have inside
<sources> <source>/app</source> </sources>
and my sonar-project.properties
sonar.projectKey=core sonar.projectName=Core sonar.projectBasedir=/app sonar.modules=component1,component2 sonar.scm.disabled=false sonar.verbose=true sonar.exclusions="**/tests/**,**/_test_results/**,**/*/migrations/*,*/manage.py,**/*.pyc,**/coverage_xml_report/**" sonar.python.version=3.8,3.9,3.10 component1.sonar.sources=/app/component1 component1.sonar.projectName=component1 component1.sonar.language=py component1.sonar.python.coverage.reportPaths=/app/component1/coverage_xml_report/coverage.xml component2.sonar.sources=/app/component2 component2.sonar.projectName=component2 component2.sonar.python.coverage.reportPaths=/app/component2/coverage_xml_report/coverage.xml
To make sonarscanner to find the files I have to edit manually each coverate report to change sources from /app to ./
But some of the components don’t work like this because have different sources.
Is multimodule the way to go? Could I configure my properties file to find the coverage files without having to edit the sources ? I tried to use relative_files in coveragerc with no success.