Skip to content

Fix the real Sonar LOW issues and make the Uno exclusion actually apply - #11

Merged
Ktechen merged 1 commit into
masterfrom
fix/sonar-low-issues
Aug 10, 2026
Merged

Fix the real Sonar LOW issues and make the Uno exclusion actually apply#11
Ktechen merged 1 commit into
masterfrom
fix/sonar-low-issues

Conversation

@Ktechen

@Ktechen Ktechen commented Aug 10, 2026

Copy link
Copy Markdown
Owner

All 62 open SonarCloud issues were LOW, but 61 of them were false positives that cannot be fixed in code. The cause is server-side: Automatic Analysis is still enabled (sonar.autoscan.enabled=true), so every sonarscanner end step is rejected and sonar.yml has never published an analysis. The results on SonarCloud therefore come from a mode that never builds, which is why the Uno app drew 57 bogus S2325 "make it static" findings (every read of an [ObservableProperty]-generated property, every IValueConverter member) and 4 S8970 "nullable warnings are disabled here" although Directory.Build.props sets enable. Applying any of them would not compile.

The same conflict makes every /d: setting in sonar.yml inert, including the Source/Trackify/**/*.cs exclusion added in #10 — which is why those findings never closed. Mirror that exclusion into .sonarcloud.properties, the file automatic analysis actually reads, so it takes effect in the mode that is running today and stays correct after the switch is flipped.

Genuine fixes, verified with SonarAnalyzer.CSharp 10.31.0.145097 run locally over the analysed scope (now clean):

  • S3878 in LwpAddressingMapping.ParseMacAddress. The suggested fix is a silent bug: Split(':', '-') binds to (char, int count) because '-' converts to int, so the '-' form would stop parsing. Use the non-params (char[], StringSplitOptions) overload, which satisfies the rule and keeps the behaviour, and add tests covering both separators.
  • S1144 unused Domain constant in LayerTrainDependencyTests.
  • S8969 redundant null-forgiving operator after Assert.NotNull.

The last two are not reported today (Test/ is only analysed by the CI scan) but would surface the moment it starts publishing.

Document the conflict as R-9 and the local analyzer procedure in arc42 7.6.

All 62 open SonarCloud issues were LOW, but 61 of them were false positives
that cannot be fixed in code. The cause is server-side: Automatic Analysis is
still enabled (sonar.autoscan.enabled=true), so every sonarscanner end step is
rejected and sonar.yml has never published an analysis. The results on
SonarCloud therefore come from a mode that never builds, which is why the Uno
app drew 57 bogus S2325 "make it static" findings (every read of an
[ObservableProperty]-generated property, every IValueConverter member) and 4
S8970 "nullable warnings are disabled here" although Directory.Build.props sets
<Nullable>enable</Nullable>. Applying any of them would not compile.

The same conflict makes every /d: setting in sonar.yml inert, including the
Source/Trackify/**/*.cs exclusion added in #10 — which is why those findings
never closed. Mirror that exclusion into .sonarcloud.properties, the file
automatic analysis actually reads, so it takes effect in the mode that is
running today and stays correct after the switch is flipped.

Genuine fixes, verified with SonarAnalyzer.CSharp 10.31.0.145097 run locally
over the analysed scope (now clean):

- S3878 in LwpAddressingMapping.ParseMacAddress. The suggested fix is a silent
  bug: Split(':', '-') binds to (char, int count) because '-' converts to int,
  so the '-' form would stop parsing. Use the non-params
  (char[], StringSplitOptions) overload, which satisfies the rule and keeps the
  behaviour, and add tests covering both separators.
- S1144 unused Domain constant in LayerTrainDependencyTests.
- S8969 redundant null-forgiving operator after Assert.NotNull.

The last two are not reported today (Test/ is only analysed by the CI scan) but
would surface the moment it starts publishing.

Document the conflict as R-9 and the local analyzer procedure in arc42 7.6.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@Ktechen
Ktechen merged commit abe65f2 into master Aug 10, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant