Code Inspections & Fixes
Numerous code inspections
In addition to detecting compilation errors, IntelliJ IDEA is capable of detecting hundreds of errors and inconsistencies, helping you with:
- Finding probable bugs, such as potential NullPointerExceptions (NPE's)
- Locating the so-called "dead code", or unused code
- Detecting performance issues
- Complying with coding guidelines and standards
- Conforming to different specifications, such as EJB, Struts, JSF and others
The code analysis is performed on-the-fly, so you don't need to execute the code first and can see the potential problems highlighted right in the editor. And of course IntelliJ IDEA provides quick fixes and intention actions for most of them.
Customizable code inspection profiles
It's obvious that you don't need several hundreds of code inspections for all the projects. You can customize the set of inspections to be applied by simply selecting or clearing corresponding check boxes. For every active inspection, you can define whether the code containing the addressed problem should be highlighted as error, or warning, or just additional info. Profiles can be saved locally or in the project file enabling sharing profile settings among team members.
Configurable code inspection scopes
You can assign different inspection sets to arbitrary parts of the project, or so-called scopes. A scope can include a single file, a folder or package, class or project or any set of these elements. Similar to inspection profiles, scopes can be shared among team members.
Custom code inspections
Create your own code inspections using the powerful Structural Search and Replace templates. The Structural Search Inspections allows you to create the templates and then highlights the code according to them. Also you can create your own quick fixes for the addressed problems by configuring the Structural Replace pattern.
Global inspection results
In addition to on-the-fly static code analysis, you can get global inspection results for your project or certain project scope.
Remote code analysis and inspection
You can remotely perform time-consuming inspections of your sources, ensuring that you have consistent and error free code day by day. Code analysis results can be conveniently reviewed through both web and IDE interface.