Skip to content

fix: resolve 18 SonarQube LOW severity issues#565

Merged
rygel merged 1 commit intodevelopfrom
fix/sonarqube-low-final
Apr 17, 2026
Merged

fix: resolve 18 SonarQube LOW severity issues#565
rygel merged 1 commit intodevelopfrom
fix/sonarqube-low-final

Conversation

@rygel
Copy link
Copy Markdown
Owner

@rygel rygel commented Apr 17, 2026

Summary

Resolves all 18 remaining LOW severity SonarQube issues.

S1075 - Hardcoded URIs (7 issues):
Suppress false positives via #pragma warning disable S1075 for provider API endpoint constants that are already centralized (GeminiProvider, GitHubCopilotProvider, MonitorService, SettingsWindow).

S1192 - Repeated string literals (4 issues):

  • CodexProvider: Extract CodexSparkProviderId and WeeklyWindowLabel constants
  • JsonConfigLoader: Extract OpenCodeDirectoryName constant
  • MonitorService: Extract HttpStatusCodeTag constant

S1905 - Unnecessary casts (2 issues):
Remove (int) cast on statusCode which is already int.

S6664 - Excessive logging (2 issues):
Consolidate endpoint logging in LogDebugReadyBanner from 2 lines to 1.

False positives (3 issues):

  • S1481: version variable in _Layout.cshtml is used in the Razor template at line 91
  • S2325 (2): SelectLimits and ClassifyHistoryEntries use this._logger (instance data)

Test plan

  • dotnet build - 0 errors
  • All 1,491 tests pass across 3 test projects
  • SonarQube scan to verify LOW issues resolved

- S1075 (7): Suppress false positives for provider API endpoint constants
  (GeminiProvider, GitHubCopilotProvider, MonitorService, SettingsWindow)
- S1192 (4): Extract repeated string literals to constants
  (CodexProvider: CodexSparkProviderId, WeeklyWindowLabel;
   JsonConfigLoader: OpenCodeDirectoryName;
   MonitorService: HttpStatusCodeTag)
- S1905 (2): Remove unnecessary (int) casts on already-int statusCode
- S6664 (2): Consolidate endpoint logging in Program.cs debug banner
- S1481 (1): False positive - version variable used in Razor template
- S2325 (2): False positives - methods use instance data (_logger)
@rygel rygel merged commit 156b84b into develop Apr 17, 2026
20 checks passed
@rygel rygel deleted the fix/sonarqube-low-final branch April 17, 2026 08:02
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