Lint to the Finish Line
summary
Step-by-step guide to writing and testing custom Android Lint checks using the AGP3-era toolchain: creates a Hungarian-notation detector that flags m/S prefixes, compiles a lint.jar and registry, and runs unit tests with the JUnit4 fluent API; explains UAST/PSI parsing and detector scopes so checks run on Java and soon Kotlin; shows a Gradle snapshot checker that scans dependency coordinates, handles duplicate reports, and bundles lint jars into AARs; demos quick fixes that modify source (string truncation for tag length) and verifies them with expect-fix diffs.
AI-written summary · about
chapters (7)
- 0:00Introduction to lint checks
- 1:15Creating a Hungarian notation check
- 7:20Implementing detector logic
- 13:37Lint check for Gradle scripts
- 16:27Lint internals and registry
- 22:51Quick fixes in lint checks
- 27:50Resources and next steps
related talks
46mLint for Life: Your Customizable Guard On the Go
44mLint. What, Why, How?
21mMastering Code Quality: A Deep Dive into Custom Linting for Android Developers
27mBuild an Android Lint in 25 Minutes
43mLinty Fresh
19mThe power of custom lint checks
24mImprove your code with Lint checks for Kotlin
20mClean Code Base: Harnessing the Power of Android Lint and Custom Rules
