Skip to content

commandMobilekotlin

Check Android Lint

Runs Android lint, groups the findings by impact and fixes the ones that affect users, crashes or Play Store releases.

npx workspacetemplates add check-android-lint --tool claude-code

Writes 1 file to .claude/commands/

.claude/commands/check-android-lint.md14 lines · 1.1 KBFile
---
description: Runs Android lint, groups the findings by impact and fixes the ones that affect users, crashes or Play Store releases.
argument-hint: "[module name, default app]"
---

Run and triage Android lint for module: $ARGUMENTS (app if empty).

1. Run `./gradlew :<module>:lintDebug` (use lintRelease when preparing a release). Read the XML at `<module>/build/reports/lint-results-*.xml`, not the console summary.
2. Group issues by severity, then by id. Ignore anything already in lint-baseline.xml.
3. Fix first: Fatal and Error items, plus these warnings when present: MissingPermission, NewApi, ObsoleteSdkInt, HardcodedText on user-facing strings, Overdraw, UnusedResources in large assets, ExportedWithoutPermission, and missing translations.
4. For each fix, make the change in Kotlin, XML or the manifest, and keep it small. Never add a @SuppressLint or edit the baseline to hide an issue without asking.
5. Re-run lint and compare counts before and after.

Report a table: issue id, count, action (fixed, deferred, needs decision) and example file:line. End by asking whether the deferred group should go into the baseline or become tickets.

What it does

A raw lint report can hold hundreds of warnings, most of them noise. This command runs lint through Gradle, reads the report and sorts findings into what breaks users, what blocks a release and what can wait.

It fixes the first two groups when the change is local and clear, and lists the rest with a short reason so the baseline can be updated deliberately.

Example

you › /check-android-lint app

agent › lintDebug: 3 errors, 41 warnings. Fixed 3 errors (2 NewApi calls guarded with SDK_INT, 1 exported receiver). Deferred 38 warnings, mostly UnusedResources in legacy drawables. Add the deferred group to the baseline?

Questions

Does it silence warnings to get a green build?
No. Suppressions and baseline edits need your explicit approval.
Does it work with multi-module projects?
Yes. Pass a module name and it runs that module only, so reports stay readable.
  • Fix iOS Build

    Commandswift

    Free
  • Flutter State Management

    Skillflutter

    Free
  • Kotlin Android Compose

    Skillkotlin

    Free
  • Mobile App Release

    SkillMobile

    Free