I am using the latest sonarscanner github action, and setting sonar.coverage.exclusions
in the sonarcloud.io project administration UI.
In a typescript project, adding entry ./reports/**
to sonar.coverage.exclusions
excludes the generated code under reports/
correctly.
In a python project, adding entry ./docs/source/conf.py
to sonar.coverage.exclusions
does not exclude file docs/source/conf.py
which is in the source repository.
In the python project, I need to add entry docs/source/conf.py
(i.e. no ./
prefix), which then does exclude the file.
There were numerous other differences I encountered when trying to apply exclusions to the python project - i.e. patterns which I expected to work based on having set up sonarcloud on other projects using other languages, did no work on the python project which is using the coverage.py xml format.
It feels like there are separate implementations of sonar.coverage.exclusions
based on the language, or perhaps based on the coverage data format. If so, it would be great if this was documented, and a consistent test suite is added to each implementation.