You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix SonarQube high-severity issues: string duplication and cognitive complexity
- Fixed string literal duplication in pkg/github/search.go
* Added constants for 'failed to read response body: %w' and 'failed to marshal response: %w'
* Replaced 4 duplicate occurrences with constant references
- Reduced cognitive complexity in cmd/mcpcurl/main.go
* Refactored main() function from complexity 18 to under 15
* Extracted schema loading logic into loadSchemaAndGenerateCommands() function
- Reduced cognitive complexity in pkg/github/pullrequests.go
* Refactored GetPullRequestFiles handler from complexity 19 to under 15
* Extracted parameter handling into getPullRequestFilesHandler() function
* Extracted API call logic into fetchAndMarshalPullRequestFiles() function
All tests pass and linting is clean.
Co-Authored-By: Eashan Sinha <eashan.sinha@codeium.com>
0 commit comments