Static Analysis (Lint) Repair Skill
This skill automates the execution, parsing, and remediation of Android Lint warnings with minimal context bloat.
Execution Steps:
Execute Lint: Run the Gradle lint task.
./gradlew :manager:lintReleaseNote: Do not read the massive console output. Rely on the generated XML report.
Parse XML Report Efficiently: The Android lint report can be massive. Instead of reading the whole XML into context, use an inline Python script or
xmllint/greppipeline to extract ONLY theseverity="Error"orseverity="Fatal"issues.python3 -c ' import xml.etree.ElementTree as ET tree = ET.parse("manager/build/reports/lint-results-release.xml") for issue in tree.getroot().findall("issue"): if issue.get("severity") in ["Error", "Fatal"]: loc = issue.find("location") print(f"{loc.get(\"file\")}:{loc.get(\"line\")} - {issue.get(\"message\")}") 'Contextualize and Fix: Read only the specific lines mentioned in the python output using the
view_filetool (specifying exactStartLineandEndLinepadding). Usemulti_replace_file_contentto fix the warnings without loading the entire class.