For ad-hoc terminal triage, use
python3 scripts/sonarqube.py <path>(or the/sonarqubeCursor command). For live-local IDE triage and quick-fix application, use theeclipse-warningsCursor skill. The TSV-export workflow below is preserved for batch categorization but is no longer the primary path.
This directory contains tools for categorizing and managing SonarQube issues in the Apache Juneau project.
The Apache Juneau project has 3,116 SonarQube issues that have been categorized into 30 categories for systematic fixing.
cd /Users/james.bognar/git/apache/juneau/master cat SONARQUBE_ISSUES_SUMMARY.md
python3 scripts/view-sonar-category.py
# View Security Issues (high priority) python3 scripts/view-sonar-category.py "Security Issues" # View with custom limit python3 scripts/view-sonar-category.py "Brain Methods (Complexity)" --limit 5
python3 scripts/categorize-sonar-issues.py /Users/james.bognar/Downloads/SonarQubeIssues.txt
categorize-sonar-issues.pyMain script for categorizing and interactively fixing SonarQube issues.
Usage:
python3 scripts/categorize-sonar-issues.py <sonarqube-issues-file> [--save-json]
Features:
Options:
--save-json: Save categorized issues to JSON fileInteractive Commands:
fix - Start fixing issues in current categoryskip - Move to next categorydetails - Show detailed issue informationlist - List all categories<number> - Jump to specific category numberquit - Exitview-sonar-category.pyHelper script to view category details without interactive input.
Usage:
# List all categories python3 scripts/view-sonar-category.py # View specific category python3 scripts/view-sonar-category.py "Category Name" # View with limit python3 scripts/view-sonar-category.py "Category Name" --limit 10
Read SONARQUBE_ISSUES_SUMMARY.md to understand:
# List all categories python3 scripts/view-sonar-category.py # Review high-priority categories python3 scripts/view-sonar-category.py "Security Issues" python3 scripts/view-sonar-category.py "Null Check Issues" python3 scripts/view-sonar-category.py "Brain Methods (Complexity)"
Begin with high-priority categories:
python3 scripts/categorize-sonar-issues.py /Users/james.bognar/Downloads/SonarQubeIssues.txt
Then:
detailsfix to start fixing issuesThe categorized JSON file (SonarQubeIssues.categorized.json) can be used to:
These can often be fixed automatically or with simple find/replace:
These need careful review and testing:
These can be fixed in batches:
SonarQubeIssues.txt - Original SonarQube export (TSV format)SonarQubeIssues.categorized.json - Categorized issues (JSON format)SONARQUBE_ISSUES_SUMMARY.md - Summary documentscripts/categorize-sonar-issues.py - Main categorization toolscripts/view-sonar-category.py - Category viewer tool# 1. View summary cat SONARQUBE_ISSUES_SUMMARY.md # 2. Check Security Issues (high priority, only 6 issues) python3 scripts/view-sonar-category.py "Security Issues" # 3. Start interactive session python3 scripts/categorize-sonar-issues.py /Users/james.bognar/Downloads/SonarQubeIssues.txt # In interactive session: # > list # See all categories # > 1 # Jump to Security Issues # > details # See issue details # > fix # Start fixing # > [choose file mode] # Process by file # > auto # Auto-fix each issue # > skip # Move to next category
For questions or issues with these tools, refer to:
SONARQUBE_ISSUES_SUMMARY.md - Detailed category descriptions