Reputation: 727
I want to write a lint check which can detect issues in resource file on the fly. For example, I want my Android Studio to highlight my <TextView>
and give warning when it does not have android:padding
.
I read this and found that we can write custom lint but only can we use it through command line but not on the fly. I also found that there is plugin like SonarLint which provides on-the-fly custom lint check.
So my question is:
Is it true that creating an Android Studio plugin is the only way to make custom lint check work on the fly?
Upvotes: 2
Views: 411
Reputation: 20130
I do not accurately answer your question because I don't have own custom lint checks. However, I'm using rxLint library which is not part of Android build tools and Android Studio highlights issues in code that are reported.
So if you will make your custom lint checks as a separate module and put your main project depend on it then Android Studio will highlight it.
Upvotes: 1