Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ jobs:
"/d:sonar.token=$SONAR_TOKEN"
"/d:sonar.cs.opencover.reportsPaths=**/coverage.opencover.xml"
"/d:sonar.cs.vstest.reportsPaths=**/TestResults/*.trx"
# Coverage scope must match what this job can actually measure: only
# backend .NET tests run here, so no coverage is supplied for the
# Angular frontend or the repo scripts. Without this, Sonar counts
# every TS/JS line as 0%-covered and any frontend PR fails the
# new-code coverage gate. Generated EF migration scaffolding is
# excluded too (see coverlet.runsettings); migration Up/Down stays.
"/d:sonar.coverage.exclusions=**/*.ts,**/*.js,**/*.mjs,**/*.html,**/*.scss,**/*.css,**/Migrations/*.Designer.cs,**/Migrations/*ModelSnapshot.cs"
)
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
args+=(
Expand Down
9 changes: 9 additions & 0 deletions coverlet.runsettings
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
<Format>cobertura,lcov,opencover</Format>
<Exclude>[*.Tests]*,[SplitIt.Shared]*</Exclude>
<ExcludeByAttribute>Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute</ExcludeByAttribute>
<!--
EF Core migration scaffolding is auto-generated and applied verbatim by
the integration-test fixture (DatabaseFixture), so coverlet reports it
as ~100% covered and it dominates the denominator (it used to be ~89%
of all coverable lines, inflating this gate to ~97%). Exclude only the
generated Designer/snapshot files; migration Up/Down logic stays in
scope. Mirrors sonar.coverage.exclusions in .github/workflows/sonarcloud.yml.
-->
<ExcludeByFile>**/Migrations/*.Designer.cs,**/Migrations/*ModelSnapshot.cs</ExcludeByFile>
<Threshold>70</Threshold>
<ThresholdType>line</ThresholdType>
<ThresholdStat>total</ThresholdStat>
Expand Down
Loading