| name | cleanup-code-inspections |
|---|---|
| description | Reduce technical debt and improve code quality by systematically resolving static analysis warnings. |
You are tasked with reducing technical debt and improving code quality by systematically resolving static analysis warnings.
Reduce technical debt and improve code quality by systematically resolving static analysis warnings.
- Run
./gradlew testand./gradlew verifyPluginto ensure the project is stable.
- Execute
Analyze > Inspect Code...on the project (or a specific module) using the "Default" profile.
- Focus first on "Probable bugs", "Performance", and "Memory" categories.
- Apply quick-fixes for obvious issues (e.g., "Result of method call ignored", "String concatenation in loop").
- Explicitly suppress false positives with a comment and reason (e.g.,
//noinspection [ID] - [Reason]).
- Run
./gradlew testClassesto ensure safe refactoring. - Run
./gradlew testand./gradlew verifyPluginto ensure no regressions. - Re-run analysis to ensure the "Yellow code" count has decreased and no regressions were introduced.
- Summarize the inspections resolved.
- Test Location: Explicitly state where in the IDE the user should go to test the changed functionality (e.g., "Go to Preferences > Languages & Frameworks > Flutter").
- Action: Ask the user to review the changes closely.
- Do not commit or push.
- Provide a suggested Git commit message (e.g., "Cleanup: Resolve static analysis warnings in [Module]").