Skip to content

fix: resolve remaining 255 SonarQube MEDIUM severity issues#562

Merged
rygel merged 1 commit intodevelopfrom
fix/sonarqube-medium-remaining
Apr 16, 2026
Merged

fix: resolve remaining 255 SonarQube MEDIUM severity issues#562
rygel merged 1 commit intodevelopfrom
fix/sonarqube-medium-remaining

Conversation

@rygel
Copy link
Copy Markdown
Owner

@rygel rygel commented Apr 16, 2026

Summary

Resolves all 255 remaining MEDIUM severity SonarQube issues through a combination of code fixes and .editorconfig suppressions for conflicting analyzer rules.

Suppressions via .editorconfig (226 issues):

  • VSTHRD111 (204): Suppress in Monitor.Tests and Web.Tests — conflicts with xUnit1030 (test code has no SynchronizationContext)
  • CA1031 (22): Suppress in all test projects — test infrastructure needs catch-all exception handling for resilience

Code fixes (29 issues):

  • S107 (6): Add pragma suppressions for methods requiring many parameters (constructor injection, pipeline processing)
  • MA0004 (5): Add ConfigureAwait(false) in 3 production files, pragma suppress in 2 test files
  • CS8629 (3): Fix nullable value type handling in ProviderBase switch arms
  • MA0011 (3): Add CultureInfo.InvariantCulture to ToString() calls
  • MA0074 (2): Add StringComparison.Ordinal to StartsWith calls
  • SA1203 (1): Move const fields before non-const fields in JsonConfigLoader
  • S1172 (1): Suppress unused parameter in Razor helper (needed for delegate signature)

Test plan

  • dotnet build - 0 errors, 0 warnings
  • All 1,490 tests pass (1 flaky WPF test excluded - PrivacyButtonBehaviorTests)
  • SonarQube scan to verify MEDIUM issues resolved

- VSTHRD111 (204): Suppress in Monitor.Tests and Web.Tests via .editorconfig
  (conflicts with xUnit1030 - test code has no sync context)
- CA1031 (22): Suppress in all test projects via .editorconfig
  (test infrastructure needs catch-all for resilience)
- S2139 (7): Already fixed - exceptions passed to logger
- S107 (6): Suppress with pragma for methods requiring many parameters
- MA0004 (5): Add ConfigureAwait(false) in production code, pragma in tests
- CS8629 (3): Fix nullable value type handling in ProviderBase
- MA0011 (3): Add CultureInfo.InvariantCulture to ToString calls
- MA0074 (2): Add StringComparison.Ordinal to StartsWith calls
- SA1203 (1): Move const fields before non-const fields
- S1172 (1): Suppress unused parameter in Razor helper
@rygel rygel merged commit 4a0374a into develop Apr 16, 2026
19 checks passed
@rygel rygel deleted the fix/sonarqube-medium-remaining branch April 16, 2026 19:30
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.

2 participants