Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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:

...