Your Code Quality Assistant in IntelliJ IDEA
Update: A new version with many improvements is announced.
TL;DR version: The plugin analyzes your Java code and presents the computed object-oriented metrics, and a comprehensive set of code smells (at design and implementation granularity) within the IDE.
IntelliJ IDEA is one of the most commonly used IDEs for Java. The community as well as professional editions are actively used by programmers and researchers worldwide. Apart from a myriad of features for developing, testing, and debugging code, the IDE also provides extensive support for refactoring. You may specify which section of code you would like to refactor with a specific refactoring technique, and the IDE will take care of the rest.
However, how you identify what to refactor? Though an experienced programmer can often smell sections of his/her code to refactor, there are still many quality issues that remain unnoticed even from experienced programmers.
Here comes DesigniteJava plugin for IntelliJ IDEA. DesigniteJava is a code quality assessment tool for code written in Java. It detects numerous architecture, design, and implementation smells that show maintainability issues present in the analyzed code. It also computes many commonly used object-oriented metrics. The plugin bridges the IDE and DesigniteJava (which is currently offered only as a console application) and helps you keep your source code quality high. Let us see how it can be useful from the code quality perspective for a Java programmer.
Installation
You may download the plugin from Jetbrain’s marketplace within IntelliJ Idea IDE (Preferences -> Plugins) or from Jetbrain’s website.
This plugin uses DesigniteJava to analyze Java source code. Hence, it requires you to download the latest version of DesigniteJava Enterprise. The plugin can also download DesigniteJava for you. If you already have DesigniteJava downloaded on your machine, you can specify the path and rest is taken care of by the tool.
Your code quality assistant
The plugin tags methods and classes suffering from various code smells by placing Designite’s icon on the gutter next to the method or class definition as a line marker. It motivates you to refactor the tagged method or class to improve the maintainability of the code. You may also click on the icon to get information about the detected smells.
Also, the plugin shows the source code quality information in a tool window to keep an eye on the code quality. The information includes all detected smells at design and implementation granularity as well as code quality metrics.
You may analyze your source code by selecting ‘Tools->Designite->Analyze code’ option within the IDE. If you wish, you may instruct the plugin via plugin settings to analyze your code every time you start the IDE.
Get started today. You may download the plugin from Jetbrain’s marketplace within IntelliJ Idea IDE (Preferences -> Plugins) or from Jetbrain’s website.