ar-sonar-sweep

Fixes a project's whole SonarQube backlog in bounded, reviewable per-file batches.

1|2|Updated Jul 11, 2026
One-click install
npx skills add https://github.com/mahsanamin/agentic-repos --skill ar-sonar-sweep-mahsanamin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ar-sonar-sweep
Source: https://github.com/mahsanamin/agentic-repos/tree/main/skills/ar-sonar-sweep
Command: npx skills add https://github.com/mahsanamin/agentic-repos --skill ar-sonar-sweep-mahsanamin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Large projects accumulate a standing SonarQube backlog of bugs, code smells, and style violations that no single PR ever touches. Manually triaging and fixing hundreds of open issues produces unreviewable thousand-line diffs, and ad-hoc fixes often violate the project's own coding rules. ## Core Features & Use Cases - Whole-branch backlog fetch: Retrieves every open issue on a branch (not just a PR's new code) via the SonarQube fetch script, with severity and type breakdown. - Severity-ordered batching: Groups issues by file, orders them BLOCKER-first, and fixes each batch on its own branch/PR so review stays tractable. - Safety guardrails: Never auto-fixes security findings, concurrency issues, or behavior-changing rules; flags them with locations for human review, and never merges. - Use Case: A repository has 300 open SonarQube issues accumulated over two years. Run the sweep to clear them in small verified batches across multiple runs, each batch committed to its own PR after build, tests, and lint pass. ## Quick Start Say "ar-sonar-sweep" or "sonar sweep" to start clearing the project's SonarQube backlog in reviewable batches.

Frequently Asked Questions about ar-sonar-sweep

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up a large SonarQube backlog automatically?▼

Run the sonar sweep with SONAR_SCOPE=all to fetch every open issue on the branch. It groups issues by file, fixes them in severity order following the project's installed rules, verifies with build/tests/lint, and commits each batch to its own branch and PR.

What is the difference between a SonarQube backlog sweep and per-PR issue fixing?▼

The per-PR flow (ar-taskflow-fix-comments with SONAR_SCOPE=changed) fixes issues only in files a feature PR touched. The sweep targets the standing backlog across the whole branch in files no current PR touches.

Does the SonarQube sweep auto-fix security vulnerabilities?▼

No. Vulnerabilities, security hotspots, concurrency issues, and behavior-changing rules are never auto-fixed. They are listed with their locations and flagged for manual human review.

What prerequisites are needed to run a SonarQube backlog sweep?▼

You need the ar-sonarqube fetch-issues.sh script installed, SONARQUBE_URL and SONARQUBE_TOKEN exported in the shell, and a clean working tree. If credentials are missing, the sweep stops and guides setup.

Can the sweep commit fixes directly to main or merge PRs?▼

No. The sweep works on isolated branches or worktrees, commits per batch with user approval, and opens PRs. Merging always remains a human decision, and it never force-pushes.

What happens when a SonarQube fix breaks the build or tests?▼

The batch does not ship until build, affected tests, and lint are all green. If a fix breaks something, that fix is reverted and the issue is flagged for manual review rather than leaving the batch red.