How can I run code analysis the same as Android Studio performs on commit?
I tried to use Analyze
- Inspect Code
feature - but it shows completely different warnings that I see during code analysis on commit.
Of course, I tried Build
- Make Project
- it also shows different warnings and even different errors.
So, it looks like Android Studio has 3 different sets of warnings & errors. And I can't find how I can run the third of them without attempt to commit changes.
think that this "Code Analysis" is the default Android Studio inspection (Analyze > Inspect Code
), as explained here - different results might be the result of using different profiles. while you can also use FindBugs (also used in some Google libraries) or add JaCoCo plugin to Gradle projects, which is Java Code Coverage for test builds.
Based of the fact that every other day Analyze
- Inspect Code
shows different warnings in the same code, I can suggest that Lint is malfunctioning and doesn't show all warnings. But on the pre-commit check it shows all warnings for changed files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With