[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

  1. Navigate to Settings → Plugins;
  2. Search for CheckStyle;
  3. Click install and then restart IDE.

Configure plugin

  1. Go to Settings → Checkstyle;
  2. Mark Google Checks as Active it means that these rules will be used by default;
  3. 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

  1. Open a file (e.g. RequestCollectionResource.java).
  2. Click on the CheckStyle panel at the right bottom of window;
  3. Click 'Check Current File' icon ;
  4. 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 .