fix: resolve 18 SonarQube LOW severity issues#565
Merged
Conversation
- 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)
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.
Summary
Resolves all 18 remaining LOW severity SonarQube issues.
S1075 - Hardcoded URIs (7 issues):
Suppress false positives via
#pragma warning disable S1075for provider API endpoint constants that are already centralized (GeminiProvider, GitHubCopilotProvider, MonitorService, SettingsWindow).S1192 - Repeated string literals (4 issues):
CodexSparkProviderIdandWeeklyWindowLabelconstantsOpenCodeDirectoryNameconstantHttpStatusCodeTagconstantS1905 - Unnecessary casts (2 issues):
Remove
(int)cast onstatusCodewhich is alreadyint.S6664 - Excessive logging (2 issues):
Consolidate endpoint logging in
LogDebugReadyBannerfrom 2 lines to 1.False positives (3 issues):
versionvariable in_Layout.cshtmlis used in the Razor template at line 91SelectLimitsandClassifyHistoryEntriesusethis._logger(instance data)Test plan
dotnet build- 0 errors