Reputation: 1064
I have a similar issue than this one. I want to get the same results (as much as possible) when running code inspections from Android Studio and from a console Gradle task. When running from AS, I am using an xml Profile that defines some inspection tools, e.g:
<inspection_tool class="AndroidLintContentDescription" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AndroidLintHardcodedText" enabled="true" level="INFO" enabled_by_default="true" />
<inspection_tool class="AndroidLintRegistered" enabled="true" level="INFO" enabled_by_default="true" />
<inspection_tool class="AnonymousClassComplexity" enabled="true" level="WARNING" enabled_by_default="true">
I am having big differences in results from AS and console (78 items in AS "Android Lint" section vs. 38 items in the console). How can I load this Profile when running Lint from console? Is this even possible?
Regards
Upvotes: 1
Views: 827
Reputation: 434
You can run the Android Studio inspections from command line:
<android studio path>/bin/inspect.sh
https://www.jetbrains.com/idea/help/running-inspections-offline.html
Upvotes: 4
Reputation: 80010
Android Lint is only a subset of the inspections that you can run in Android Studio/IntelliJ. If you want the same results in both, you should disable any non-Android-Lint inspections in Android Studio.
Upvotes: 0