Skip to content

Commit b2d47b5

Browse files
committed
Merge pull request #114 from MALPI
* pr/114: Polish "Add README example for package exclusion" Add README example for package exclusion Closes gh-114
2 parents 7a8b95f + 851aee7 commit b2d47b5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.adoc

+9
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,15 @@ 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+
[source,groovy,indent=0,subs="normal"]
142+
----
143+
tasks.withType(io.spring.javaformat.gradle.CheckTask) {
144+
exclude "package/to/exclude"
145+
}
146+
----
147+
139148
==== Checkstyle
140149
To enforce checksyle conventions add the checkstyle plugin and include a dependency on `spring-javaformat-checkstyle`:
141150

0 commit comments

Comments
 (0)