/android-custom-lint-rules

An introduction to Android custom lint rules

Primary LanguageHTMLGNU General Public License v2.0GPL-2.0

Android - Custom linting

This repository objective is to play with custom linting for our Android project. Why, should we do that ? It can be a great way to share common guideline inside a team.

ViewBinding memory leaks detector

To give you an example of useful rule. You can find in this project a way to detect memory leaks while using ViewBinding inside Fragment. If you don't know what I'm talking about, I will let you with this article.

How to test your custom rule

To be able to see your rules in action, you need to pass the lint on your project. For example, here I run the following command :

./gradlew :app:lintDebug

Great sources to read