Lint for Life: Your Customizable Guard On the Go
summary
Demonstrates a custom Android Lint rule that flags constructors with more than two parameters and suggests a generated builder, implemented with UAST/PSI scanners, IssueRegistry, and the Lint testing API; packaging uses a lint JAR or Gradle artifact and an environment variable controls the parameter threshold. Includes an autofix replace that inserts the builder in the IDE, tests pass, and the approach already shipped a Retrofit-related rule at Groupon. Notes that Android Lint grows to about 300 checks and integrates into build-time and IDE reports.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:47What is Android Lint
- 3:35Custom Lint Rule Demo
- 8:57Configuring Lint Rules
- 11:07Building a Constructor Detector
- 17:57Understanding UAST and AST
- 22:56Implementing the Detector
- 26:58Testing the Custom Rule
- 29:49Adding Quick Fixes
- 33:27Making Rules Configurable
- 34:54Other Static Analysis Tools
- 39:15Choosing the Right Tool
- 40:45Summary and Resources
- 41:50Q&A
related talks
29mLint to the Finish Line
44mLint. What, Why, How?
27mBuild an Android Lint in 25 Minutes
20mClean Code Base: Harnessing the Power of Android Lint and Custom Rules
15mClean Code Base: Harnessing the Power of Android Lint and Custom Rules
21mGetting the most out of Android Lint
21mMastering Code Quality: A Deep Dive into Custom Linting for Android Developers
24mImprove your code with Lint checks for Kotlin
