We have a Monorepo for which we have setup a custom quality gate and coverage rules.
The rules for line coverage and branch coverage have been set to 75% for the languages we support internally, and these rules have a Blocker severity. Our Quality Gate is then configured to flag any Blocker or Critical issue.
This mode is working well on our main repository, and has been flagging Pull Requests that have files updated but with a threshold below the requirement. The submitter is then forced to review the issues and can lower the severity of each issue if needed so the PR can then be merged.
We have created new micro repos that use the very same rules, and quality gate. The strange thing however is that files with little or no coverage are never marked as blocking by Sonar on the PRs and we cannot seem to figure out why. The code coverage percentages are reported properly and other issues such as code smells do show up in the sonar report in the PR.
We are on SonarCloud with all private repositories. The repo that is working as expected if building on Jenkins, and the others are on GitHub Actions, but we do not believe it should have any impact on the behavior we are seeing.