Description
This is a CheckStyle plug-in for JetBrain's IntelliJ IDEA.
Unlike JetStyle, this plug-in was original written to provide real-time integration, in a similar manner to Eclipse-CS. From version 0.4 it also provides on-demand scanning for the current file and project.
Usage
Real-time scanning is provided as an Inspection. On-demand scanning is available as a tab at (by default) the bottom of the IDEA window.
Configuration for both the inspection and the on-demand scanning is done via the CheckStyle item in the Settings panel.
Click on Real-time Scan and you will be able to specify the report severity and activate the inspection as appropriate.
Current Features
In version 3.x:
- CheckStyle 5.0 support.
- Per-module configuration.
In version 2.x:
- Scan files in real-time with an IDEA inspection.
- Scan the current file, module or project on demand.
- Standard Java rules are built in, or specify your own CheckStyle file.
- Ability to add third party checks to the classpath.
- Ability to define external properties.
Version 1.x is for IDEA6 and is no longer maintained. 2.x is for IDEA 7 and (from 2.2) 8.
Current Limitations
- The plugin will throw exceptions if used with class files targeted at a later version than that of the JDK used by IDEA. In particular, this will affect Mac users with the pre-release of JDK6. The solution is to target class files at the version of the IDEA JRE (i.e. 1.5 for Mac users). Thanks to J. G. Christopher.
- If you change the configuration options the real-time scan will not be updated until the file is either changed or reopened.
- We do not check if a property definition is required for a given file. Hence you can exit configuration without setting required properties. Given, however, that CheckStyle files can change without the plug-in being aware this is something we'll always have to live with to some degree.
- CheckStyle errors and warnings from the inspection are both shown at a single level, as IDEA will only allow one warning level for an inspection.