Skip to content

extend readme with example for package exclusion. #114

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
8 changes: 8 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ For source formatting, add the `spring-javaformat-gradle-plugin` to your `build`
The plugin adds `format` and `checkFormat` tasks to your project.
The `checkFormat` task is automatically applied when running the standard Gradle `check` task.

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:

```
tasks.withType(io.spring.javaformat.gradle.CheckTask) {
exclude "package/to/exclude"
}
```

==== Checkstyle
To enforce checksyle conventions add the checkstyle plugin and include a dependency on `spring-javaformat-checkstyle`:

Expand Down