We’re using SonarCloud with Bitbucket pipelines for analysis; our projects are predominantly PHP. Starting late last week, SonarCloud began reporting that our test files lacked test coverage despite having
sonar.test.exclusions set in our
sonar.exclusions=artifacts/**/* sonar.coverage.exclusions=page-templates/**/*,template-parts/**/* sonar.test.exclusions=tests/**/*
The trouble seems to be with tests that are nested a few directories below
tests, despite the
** in the exclusions property.
I tried setting
sonar.tests=tests/ in place of the
sonar.test.exclusions setting, but that prevented SonarCloud from showing any coverage measure. Adding
sonar.coverage.exclusions seems to be my only choice.
Is it expected that my tests need to be explicitly excluded from coverage, or should either
sonar.test.exclusions have accomplished what