Switch to using diff-cover for the Coverage gate (#33673)

* Switch to using diff-cover for the Coverage gate

Enabling developers to check their PR coverage without waiting for CI

* Remove sonar-project.properties - in automatic mode Sonar will not read this file

* Add note to CONTRIBUTING.md

* Skip sonar in MQ
This commit is contained in:
Michael Telatynski
2026-06-01 12:26:03 +00:00
committed by GitHub
parent dd2ae6e36c
commit 35484e5183
16 changed files with 83 additions and 194 deletions
+4
View File
@@ -140,6 +140,10 @@ These are located in `/spec/` in `matrix-js-sdk` or `/test/` in `element-web`.
When writing unit tests, please aim for a high level of test coverage
for new code - 80% or greater. If you cannot achieve that, please document
why it's not possible in your PR.
CI will validate that the coverage reached on your change is sufficient,
you can also assert this locally by installing https://github.com/Bachmann1234/diff_cover,
running the entire test suite in coverage mode `pnpm coverage` then running
`pnpm coverage:diff` to see the coverage of the diff between your HEAD and `develop`.
Some sections of code are not sensible to add coverage for, such as those
which explicitly inhibit noisy logging for tests. Which can be hidden using