mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-08 00:50:44 +00:00
Bridges LLM agents with SonarCloud's REST API to fetch and format code quality issues as structured markdown with processing instructions.
1.7 KiB
1.7 KiB
x-sonarcloud
Usage
x-sonarcloud # Auto-detect, all open issues
x-sonarcloud --pr <number> # PR-specific issues
x-sonarcloud --branch <name> # Branch-specific issues
x-sonarcloud --org <org> --project-key <key> # Explicit project
x-sonarcloud --severities BLOCKER,CRITICAL # Filter by severity
x-sonarcloud --types BUG,VULNERABILITY # Filter by type
x-sonarcloud --statuses OPEN,CONFIRMED # Filter by status
x-sonarcloud --resolved # Include resolved issues
x-sonarcloud -h|--help # Show help
Fetches SonarCloud code quality issues via REST API and formats them as structured markdown with LLM processing instructions for automated analysis and triage.
Examples
x-sonarcloud # All open issues in project
x-sonarcloud --pr 42 # Issues on PR #42
x-sonarcloud --branch main # Issues on main branch
x-sonarcloud --severities BLOCKER --types BUG # Only blocker bugs
Requirements
curlandjqinstalledSONAR_TOKENenvironment variable set (generate at https://sonarcloud.io/account/security)- Project auto-detection via
sonar-project.propertiesor.sonarlint/connectedMode.json, or explicit--org/--project-keyflags
Environment Variables
SONAR_TOKEN— Bearer token for SonarCloud API authentication (required)INFO=1— Enable informational log messages on stderrDEBUG=1— Enable debug log messages on stderr