Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check code cyclomatic complexity in Android studio?

How to check code cyclomatic complexity in Android Studio? Is there any plugin available for Android Studio to check code complexity?

like image 607
vishalk Avatar asked Dec 09 '14 09:12

vishalk


People also ask

Which tool can you use to detect cyclomatic complexity of methods?

Cyclomatic complexity testing tools There are plenty of source code quality and code coverage tools that include this metric in their reporting. Three popular examples of cyclomatic complexity testing tools include SonarQube, JaCoCo and the Eclipse Metrics plugin.


1 Answers

Go to Files -> Settings -> Plugins in Android Studio Type "Metrics Reloaded" in the search bar and install the plugin Click on Apply Restart the Android Studio

Now open your source file and right click on it. Go to Analyze -> Calculate Metrics In the window, select metrics scope as "current file" and metrics profile as "Complexity Metrics" and Click on "Ok".

Results will be displayed after clicking OK. v(G) is the cyclometric complexity ev(G) is the essential cyclometric complexity iv(G) is the Module Design Complexity Metric

like image 153
Roja Vangapalli Avatar answered Oct 21 '22 05:10

Roja Vangapalli