Skip to content

Commit e26518b

Browse files
ttddyywilkinsona
authored andcommitted
Document how to set up Checkstyle-IDEA plugin
See gh-318 Signed-off-by: Tadaya Tsuyukubo <[email protected]>
1 parent 044a405 commit e26518b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.adoc

+23
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,29 @@ 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+
243266

244267

245268
=== About the Conventions

0 commit comments

Comments
 (0)