Sonar.coverage.exclusions inconsistent across languages

I am using the latest sonarscanner github action, and setting sonar.coverage.exclusions in the 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/ to sonar.coverage.exclusions does not exclude file docs/source/ which is in the source repository.

In the python project, I need to add entry docs/source/ (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 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.

Hello @jayvdb and thanks for your feedback.

We do have a dedicated documentation page about file matching patterns, which are used when processing this property: sonar.coverage.exclusions. Could you please take a look on that, review your exclusions patterns and tell us if you still get any inconsistence?

The typescript project supports ./reports/ which is not according to the docs with the leading ./. I am not going to experiment with removing it because if it doesnt exclude it, my statistics will have a spike in them.

Could you comment on this? Are their different parsers of this config setting?

No, we evaluate this config setting and apply exclusion to all language analysers the same way.