Hi,
sonar.branch.name=main
Yep. That would do it.
If you assert branch, PR &etc, the integrations aren’t going to override that. (Imagine how frustrating it would be if you wanted to set that manually & couldn’t.)
While I’m looking at your properties, I don’t see a declaration of sonar.sources
. So that’s defaulting to .
. What I do see is:
sonar.exclusions=**/libraries/**/*,
sonar.coverage.exclusions=**/libraries/**/*,
sonar.cpd.exclusions=**/libraries/**/*,
So first… those trailing commas are weird (but harmless). But if something’s excluded with sonar.exclusions
there’s no need to further exclude it for coverage & duplications (cpd). Those are subsets. It’s already not part of the analysis at all, so there’s no way it could be considered for coverage & duplications.
sonar.inclusions=**/*.js, **/*.tf, **/*.py, **/*.jsx
It’s a fairly rare circumstance that you actually need both inclusions and exclusions together. Are there other file types that you just really don’t want included in the analysis? And if so, why not add them to the exclusions?
Really, you’re better off trying to set a good sonar.sources
value. And even better off relying on the docs rather than ChatGPT
And finally, there’s this:
sonar.test.inclusions=**/__tests__/**/test_*.*, **/test-helpers/**/*, **/tests/test_*.py
You’re trying to specify which subset of files described by sonar.tests
to actually include as test files. But… there’s no sonar.tests
definition. sonar.sources
defaults to .
because you won’t get very far in analysis if you don’t tell us where the source files are, so we kindly provide a sane default. But there’s no default for sonar.tests
, so there’s nothing to subset from.
HTH,
Ann