You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Format is a configuration element that makes it possible to apply
generic formatting steps (EndWithNewline, LicenseHeader, etc.) to
a set of files defined by custom includes and excludes. Example of
format configuration:
```
<configuration>
<format>
<includes>
<include>src/**/txt/**/*.txt</include>
</includes>
<excludes>
<exclude>src/**/txt/**/*Wrong.txt</exclude>
</excludes>
<endWithNewline/>
<trimTrailingWhitespace/>
<licenseHeader>
<content>// License Text</content>
<delimiter>start</delimiter>
</licenseHeader>
</format>
</configuration>
```
It is currently possible to only define a single `<format>` element in
plugin configuration.
This commit makes it possible to define multiple formats. Format
configuration structure remains the same but all formats should be
enclosed in `<formats>...</formats>`. Example:
```
<configuration>
<formats>
<format>...format 1 includes, excludes and steps</format>
<format>...format 2 includes, excludes and steps</format>
<format>...format 3 includes, excludes and steps</format>
</formats>
</configuration>
```
Copy file name to clipboardexpand all lines: plugin-maven/README.md
+51-44
Original file line number
Diff line number
Diff line change
@@ -168,53 +168,60 @@ By default, all files matching `src/main/kotlin/**/*.kt` and `src/test/kotlin/**
168
168
169
169
## Applying to custom sources
170
170
171
-
By default, no Ant-Style include patterns are defined. Each element under `<format>` is a step, and they will be applied in the order specified. Every step is optional, and they will be applied in the order specified.
171
+
By default, no Ant-Style include patterns are defined. Each element under `<format>` is a step, and they will be applied in the order specified. Every step is optional, and they will be applied in the order specified. It is possible to define multiple custom formats.
172
172
173
173
```xml
174
174
<configuration>
175
-
<format>
176
-
<includes>
177
-
<!-- include all property files in "resource" folders under "src" -->
0 commit comments