Hello, I have a project on Azure DevOps. There, I have a pipeline to build and test my code. I added this step below + task: SonarCloudAnalyze@1.
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'SonarCloud - ABC'
organization: 'foo-bar-company'
scannerMode: CLI
configMode: manual
cliProjectKey: 'MyProjectPy-2023'
cliProjectName: 'MyProjectPy'
extraProperties: |
sonar.python.coverage.reportPaths = $(System.DefaultWorkingDirectory)/tests_results/coverage.xml
It runs successfully but in coverage, my test folder shows as uncovered which bring the total coverage to 40%. I tried following this guide Analysis Scope | SonarCloud Docs but none of it works. What properties should I add to only cover the appropriate code?
My folder structure:
- MyProjectPy
- some_folder
- some_script.cmd
- MyProjectPy
- api
- io.py
- price.py
- sql
- read.py
- write.py
- auth.py
- datalake.py
- tests
- test_api
- test_io.py
- test_price.py
- test_sql
- test_read.py
- test_write.py
- test_auth.py
- test_datalake.py
