Hi,
I am not able to get any coverage report in the Pull request but main Branch reports the coverage just fine. I am always getting No Coverage information in PR analysis.
Log:
INFO: Sensor Python Sensor [python]
INFO: Starting global symbols computation
INFO: 85 source files to be analyzed
INFO: 85/85 source files have been analyzed
INFO: Starting rules execution
INFO: 85 source files to be analyzed
INFO: 85/85 source files have been analyzed
INFO: Starting test sources highlighting
INFO: 18 source files to be analyzed
INFO: 18/18 source files have been analyzed
INFO: Sensor Python Sensor [python] (done) | time=6065ms
INFO: Sensor Cobertura Sensor for Python coverage [python]
INFO: Python test coverage
INFO: Parsing report '/home/user/workspace/xxxx_PR-151/coverage.xml'
ERROR: Cannot resolve the file path xxxx/templates/403.html' of the coverage report, the file does not exist in all 'source'.
ERROR: Cannot resolve 53 file paths, ignoring coverage measures for those files
INFO: Sensor Cobertura Sensor for Python coverage [python] (done) | time=175ms
INFO: Sensor PythonXUnitSensor [python]
INFO: Processing report '/home/user/workspace/xxxx_PR-151/pytest_xunit.xml'
- ALM used : GitHub
- CI system used : Jenkins
- Scanner command used :
sh "${SCANNER_HOME}/bin/sonar-scanner -Dsonar.login=${SONAR_LOGIN} \
-Dsonar.python.coverage.reportPaths=coverage.xml \
-Dsonar.python.xunit.reportPath=pytest_xunit.xml \
-Dsonar.python.version=3.9 \
-Dsonar.sources=./XXXXX \
-Dsonar.projectBaseDir=. \
-Dsonar.projectKey=${PROJECT_NAME} \
-Dsonar.organization=${SONAR_ORGANIZATION} \
-Dsonar.pullrequest.key=${CHANGE_ID} \
-Dsonar.pullrequest.branch=${CHANGE_BRANCH} \
-Dsonar.pullrequest.base=${CHANGE_TARGET} \
-Dsonar.pullrequest.key=${CHANGE_ID}"
sonar-project.properties
sonar.organization=xxx
sonar.projectKey=xxxx
sonar.projectName=xxxx
sonar.projectVersion=1.0
sonar.sources=xxx
sonar.tests=xxx
sonar.test.inclusions=xxxx/tests/test_*.py
sonar.exclusions=xxxx/tests/test_*.py
sonar.host.url=https://sonarcloud.io
sonar.language=py
sonar.python.version=3.9
sonar.python.coverage.reportPaths=coverage.xml
sonar.python.xunit.reportPath=pytest_xunit.xml
Other details
- Languages of the repository : Python
- Error observed
No Coverage information
No Duplication information