How to run code inspection on an entire project in Android Studio

Viewed 16

I have and Android Studio project I haven't opened in months, and when I look at some individual files there's warning and errors that appear (missing permissions, deprecated functions, etc.).

I want to see all these errors/warnings at once instead of having the navigate to each file to see if it contains any.

When I run Code > Inspect Code with an inspection scope of Whole project, all it returns are warnings about typos and unknown XML attributes:

enter image description here

However, when I run an inspection with a scope of an individual file, it returns errors that aren't in the whole project scope:

enter image description here

The Inspection Profile is the same same in each case: Project Default.

Am I doing something wrong, and is there a way to see all warnings/errors for the entire project?

1 Answers

Run code inspection on an entire project in Android Studio

Step 1:

Got to File>Settings>Plugins

Step 2:

  • Search for Plugin SonarLint and install it. enter image description here

Step 3:

Right Click on your project directory and analyze it with sonarLint. You will get all the warnings, errors and code improvements. enter image description here

Thank you.

Related