Skip to content

Commit ce00f18

Browse files
MALPIphilwebb
authored andcommitted
Add README example for package exclusion
See gh-114
1 parent 7a8b95f commit ce00f18

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ For source formatting, add the `spring-javaformat-gradle-plugin` to your `build`
136136
The plugin adds `format` and `checkFormat` tasks to your project.
137137
The `checkFormat` task is automatically applied when running the standard Gradle `check` task.
138138

139+
In case you want to exclude a package from being checked, for example if you generate sources, you can do this by adding following configuration:
140+
141+
```
142+
tasks.withType(io.spring.javaformat.gradle.CheckTask) {
143+
exclude "package/to/exclude"
144+
}
145+
```
146+
139147
==== Checkstyle
140148
To enforce checksyle conventions add the checkstyle plugin and include a dependency on `spring-javaformat-checkstyle`:
141149

0 commit comments

Comments
 (0)