The plugin is a linter that will highlight code style violations as warnings in IntelliJ IDEA.
Your code will be graded on style. This plugin allows you to easily spot violations so you can avoid losing easy points on your programming homework. In addition, our style grader on Gradescope will grade based on the configurations set up in the plugin. In other words, Gradescope and this plugin will look for the same style violations.
NOTE: This guide is based on version 2021.3. The following steps may vary depending on your IntelliJ IDEA version.
NOTE: If you don’t want to repeat the following setup every time you open a project, first navigate to Settings for New Projects by clicking on [File → New Projects Setup → Settings/Preferences for New Projects], or [Customize → All settings…] from the welcome page. Then complete all the following setup.
Otherwise, if you want to modify the settings for a specific project, you can go to [IntelliJ IDEA → Preferences] on macOS or [File → Settings] on Windows/Linux. Note that Settings for New Projects does not affect any settings for projects you have already opened/imported, so you may need to go back and modify those on your own.
Once the plugin is installed, you will see a new tab in your Settings window (via [IntelliJ IDEA → Preferences] or [File → Settings]) labeled Checkstyle (most likely located under the Tools tab). Try searching if you did not find it.
Once you are in the Checkstyle page, you will have to make sure the following configurations are correct:
Now click on the + sign of Configuration file. In the newly popped-up window:
Property Name
labeled filter, double click on the corresponding Value
field, and fill in https://gist.github.com/superfashi/b6d24924830f45fae5786cdcee02f049/raw/520f9d293217d731e47bdc4fa0a8b2a529a4e50c/suppressions.xmlMake sure for all selectables under Configuration File, check and only check Active for your newly added configuration file. Click on OK to save your changes.
If you want to toggle real-time checkstyle warnings within a project, navigate to [IntelliJ IDEA → Preferences] on macOS or [File → Settings] on Windows/Linux and navigate to [Editor → Inspections]. Search for Checkstyle and you should be able to toggle “Checkstyle real-time scan” on and off or make other customizations.