Skip to content

Document how to set up Checkstyle-IDEA plugin #318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,29 @@ The plugin is automatically enabled when one or more of the following conditions
* For maven based project, `spring-javaformat-maven-plugin` plugin is defined in `pom.xml`
* For gradle based project, `io.spring.javaformat` plugin is applied

==== IntelliJ IDEA CheckStyle-IDEA plugin
The https://plugins.jetbrains.com/plugin/1065-checkstyle-idea[CheckStyle-IDEA plugin] provides checkstyle integration to the IntelliJ IDEA.

To configure the plugin, first you need to create your own checkstyle configuration file.

[source,xml,indent=0]
----
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="com.puppycrawl.tools.checkstyle.Checker">
<module name="io.spring.javaformat.checkstyle.SpringChecks" />
</module>
----

Once configuration file is created:

* Open `Preferences` - `Tools` - `Checkstyle`
* Add `spring-javaformat-checkstyle-[VERSION].jar` and `spring-javaformat-config-[VERSION].jar` to the `Third-Party Checks`
* Specify appropriate `Checkstyle version`
* Add your checkstyle configuration file.



=== About the Conventions
Expand Down