The power of custom lint checks
summary
Shows how to write a custom Android Lint check that detects calls to android.util.Log and enforces using Timber instead by implementing a wrong timber usage detector (JavaScanner), registering an Issue in the IssueRegistry, and packaging it as a Java module that exports a lint.jar and plugs into Gradle so lint runs on CI. Includes unit testing strategy (extend lint check test / AbstractCheckTest), shows the detector’s visit/report flow, and demonstrates that the checks run and can be debugged via tests.
AI-written summary · about
chapters (7)
- 0:00Introduction to Lint
- 1:20Benefits and challenges
- 2:57Defining custom checks
- 6:38Implementing the detector
- 12:24Integration into projects
- 14:44Testing custom rules
- 17:38Debugging and conclusion
related talks
43mLinty Fresh
21mMastering Code Quality: A Deep Dive into Custom Linting for Android Developers
44mLint. What, Why, How?
17mEnsuring code-correctness with custom lint checks
29mLint to the Finish Line
46mLint for Life: Your Customizable Guard On the Go
21mGetting the most out of Android Lint
20mClean Code Base: Harnessing the Power of Android Lint and Custom Rules
