[DRAFT] How to setup CheckStyle plugin for Intellij IDEA (mod-circulation)
[DRAFT] How to setup CheckStyle plugin for Intellij IDEA (mod-circulation)
By agreement mod-circulation uses Google Java Style, this article describes how to configure CheckStyle plugin for Intellij IDEA.
Install plugin
- Navigate to Settings → Plugins;
- Search for CheckStyle;
- Click install and then restart IDE.
Configure plugin
- Go to Settings → Checkstyle;
- Mark Google Checks as Active it means that these rules will be used by default;
- It is recommended to set Scan Scope to Only Java sources (Including tests), so the plugin will check production code as well as test files;
Pic. 1: CheckStyle plugin configuration
Check a file
- Open a file (e.g. RequestCollectionResource.java).
- Click on the CheckStyle panel at the right bottom of window;
- Click 'Check Current File' icon ;
- Report should be displayed as following:
Pic. 2: Generated report
5. You can also run CheckStyle plugin against all changed files by pressing 'Check All Modified Files' button
., multiple selections available, Use left or right arrow keys to navigate selected items