Skip to content

fix(sonar): clear the two open SonarQube issues - #248

Merged
Upellift99 merged 2 commits into
mainfrom
fix/sonar
Oct 24, 2026
Merged

Upellift99 merged 2 commits into
mainfrom
fix/sonar

Conversation

@Upellift99

Copy link
Copy Markdown
Owner

Fixes the two open SonarQube issues on main, both CRITICAL.

  • S1192 in internal/api/ratelimit.go: the "rate limit exceeded" body was repeated three times; it is now the errRateLimitExceeded constant. The response sent to clients is unchanged.
  • S3776 in internal/api/router.go: NewRouter had a cognitive complexity of 21 (limit 15). The /api/v1, /api/admin, /mcp and /healthz setup moved into mountPublicAPI, mountAdminAPI, mountMCP and healthzHandler. Middleware order, routes and the shared per-key limiter are unchanged.

gofmt, go vet ./... and go test ./... pass on golang:1.27-alpine. Sonar does not analyse PRs, so the issues will only show as closed after the next scan of main.

🤖 Generated with Claude Code

Upellift99 and others added 2 commits October 25, 2026 01:28
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4af91846-45a2-4547-b70e-56ccf5d6b355
Commits

Reviewing files that changed from the base of the PR and between e2a8296 and f194afc.

Files selected for processing: 2
  • internal/api/ratelimit.go
  • internal/api/router.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Upellift99
Upellift99 merged commit 66ea6a6 into main Oct 24, 2026
13 checks passed
@Upellift99
Upellift99 deleted the fix/sonar branch October 24, 2026 23:35
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