Skip to content

Commit 51ec313

Browse files
committed
Document how to set up Checkstyle-IDEA plugin
Signed-off-by: Tadaya Tsuyukubo <[email protected]>
1 parent 044a405 commit 51ec313

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Loading

README.adoc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,31 @@ The plugin is automatically enabled when one or more of the following conditions
240240
* For maven based project, `spring-javaformat-maven-plugin` plugin is defined in `pom.xml`
241241
* For gradle based project, `io.spring.javaformat` plugin is applied
242242

243+
==== IntelliJ IDEA CheckStyle-IDEA plugin
244+
The https://plugins.jetbrains.com/plugin/1065-checkstyle-idea[CheckStyle-IDEA plugin] provides checkstyle integration to the IntelliJ IDEA.
245+
246+
To configure the plugin, first you need to create your own checkstyle configuration file.
247+
248+
[source,xml,indent=0]
249+
----
250+
<?xml version="1.0"?>
251+
<!DOCTYPE module PUBLIC
252+
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
253+
"https://checkstyle.org/dtds/configuration_1_3.dtd">
254+
<module name="com.puppycrawl.tools.checkstyle.Checker">
255+
<module name="io.spring.javaformat.checkstyle.SpringChecks" />
256+
</module>
257+
----
258+
259+
Once configuration file is created:
260+
261+
* Open `Preferences` - `Tools` - `Checkstyle`
262+
* Add `spring-javaformat-checkstyle-[VERSION].jar` and `spring-javaformat-config-[VERSION].jar` to the `Third-Party Checks`
263+
* Specify appropriate `Checkstyle version`
264+
* Add your checkstyle configuration file.
265+
266+
image::.github/images/setup-idea-checkstyle-plugin.png[Setup IntelliJ IDEA checkstyle plugin]
267+
243268

244269

245270
=== About the Conventions

0 commit comments

Comments
 (0)