fix code coverage test#4938
Open
tpurschke wants to merge 1 commit into
Open
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Root cause
The develop/main analysis workflow sonarcloud.yml only built the solution and never ran tests or imported coverage reports — unlike sonarcloud-pr.yml. Without an imported report, Sonar counts every executable new line as uncovered, which is why all 13 files showed exactly 0.0% (and the PRs that introduced this code passed their gates fine, because the PR workflow does collect coverage).
Changes
Verification
I ran both suites locally with coverage and cross-referenced every new line since v9.2.0 (the new-code baseline). Python: 400 tests pass, all new lines in all 6 flagged files already covered. C#: 2721 tests pass, all new lines covered except two spots that stay uncovered deliberately — NotificationEmailLayoutHelper.cs:68 (PDF branch needs a real Chrome; the suite already skips browser-dependent tests) and PeriodicTaskRunner.cs:88-89 (a race guard that can't be hit deterministically). That leaves new-code coverage around 97%, well above the gate.