@@ -48,8 +48,9 @@ user@machine repo % mvn spotless:check
4848- ** Languages**
4949 - [ Java] ( #java ) ([ android] ( #android ) , [ google-java-format] ( #google-java-format ) , [ eclipse jdt] ( #eclipse-jdt ) , [ prettier] ( #prettier ) )
5050 - [ Kotlin] ( #kotlin ) ([ ktlint] ( #ktlint ) , [ ktfmt] ( #ktmt ) , [ prettier] ( #prettier ) )
51- - [ Scala] ( #scala ) ([ scalafmt] ( https://github.com/scalameta/scalafmt/releases ) )
52- - [ C/C++] ( #c-c++ ) ([ eclipse cdt] ( https://www.eclipse.org/cdt/ ) )
51+ - [ Scala] ( #scala ) ([ scalafmt] ( #scalafmt ) )
52+ - [ C/C++] ( #c-c++ ) ([ eclipse cdt] ( #eclipse-cdt ) )
53+ - [ Antlr4] ( #antlr4 ) ([ antlr4formatter] ( #antlr4formatter ) )
5354 - [ Typescript] ( #typescript ) ([ tsfmt] ( #tsfmt ) , [ prettier] ( #prettier ) )
5455 - Multiple filetypes
5556 - [ Prettier] ( #prettier ) (and [ plugins] ( #prettier-plugins ) )
@@ -139,18 +140,18 @@ Spotless requires Maven to be running on JRE 8+.
139140 <include >src/test/java/**/*.java</include >
140141 </includes >
141142
142- <importOrder /> <!-- standard import order -->
143+ <importOrder /> <!-- standard import order -->
143144 <importOrder > <!-- or a custom ordering -->
144145 <order >java,javax,org,com,com.diffplug,</order > <!-- or use <file>${basedir}/eclipse.importorder</file> -->
145146 <!-- You probably want an empty string at the end - all of the
146147 imports you didn't specify explicitly will go there. -->
147148 </importOrder >
148149
149- <removeUnusedImports /> <!-- self-explanatory -->
150+ <removeUnusedImports /> <!-- self-explanatory -->
150151
151- <googleJavaFormat /> <!-- has its own section below -->
152- <eclipse /> <!-- has its own section below -->
153- <prettier /> <!-- has its own section below -->
152+ <googleJavaFormat /> <!-- has its own section below -->
153+ <eclipse /> <!-- has its own section below -->
154+ <prettier /> <!-- has its own section below -->
154155
155156 <licenseHeader >
156157 <content >/* (C)$YEAR */</content > <!-- or <file>${basedir}/license-header</file> -->
@@ -203,11 +204,11 @@ Spotless requires Maven to be running on JRE 8+.
203204 imports you didn't specify explicitly will go there. -->
204205 </importOrder >
205206
206- <removeUnusedImports /> <!-- self-explanatory -->
207+ <removeUnusedImports /> <!-- self-explanatory -->
207208
208- <ktlint /> <!-- has its own section below -->
209- <ktfmt /> <!-- has its own section below -->
210- <prettier /> <!-- has its own section below -->
209+ <ktlint /> <!-- has its own section below -->
210+ <ktfmt /> <!-- has its own section below -->
211+ <prettierv /> <!-- has its own section below -->
211212
212213 <licenseHeader >
213214 <content >/* (C)$YEAR */</content > <!-- or <file>${basedir}/license-header</file> -->
@@ -257,7 +258,7 @@ Spotless requires Maven to be running on JRE 8+.
257258 <include >src/test/scala/**/*.sc</include >
258259 </includes >
259260
260- <scalafmt /> <!-- has its own section below -->
261+ <scalafmt /> <!-- has its own section below -->
261262
262263 <licenseHeader >
263264 <content >/* (C)$YEAR */</content > <!-- or <file>${basedir}/license-header</file> -->
@@ -297,7 +298,7 @@ Spotless requires Maven to be running on JRE 8+.
297298 <include >src/native/**</inclue >
298299 </includes >
299300
300- <eclipseCdt > <!-- has its own section below -->
301+ <eclipseCdt / > <!-- has its own section below -->
301302
302303 <licenseHeader >
303304 <content >/* (C)$YEAR */</content > <!-- or <file>${basedir}/license-header</file> -->
@@ -317,6 +318,37 @@ Spotless requires Maven to be running on JRE 8+.
317318</eclipseCdt >
318319```
319320
321+ ## Antlr4
322+
323+ [ code] ( https://github.com/diffplug/spotless/blob/main/plugin-maven/src/main/java/com/diffplug/spotless/maven/antlr4/Antlr4.java ) . [ available steps] ( https://github.com/diffplug/spotless/tree/main/plugin-maven/src/main/java/com/diffplug/spotless/maven/antlr4 ) .
324+
325+ ``` xml
326+ <configuration >
327+ <antlr4 >
328+ <!-- These are the defaults, you can override if you want -->
329+ <includes >
330+ <include >src/*/antlr4/**/*.g4</include >
331+ </includes >
332+
333+ <antlr4formatter /> <!-- has its own section below -->
334+
335+ <licenseHeader >
336+ <content >/* (C)$YEAR */</content > <!-- or <file>${basedir}/license-header</file> -->
337+ </licenseHeader >
338+ </antlr4 >
339+ </configuration >
340+ ```
341+
342+ ### antlr4formatter
343+
344+ [ homepage] ( https://github.com/antlr/Antlr4Formatter ) . [ available versions] ( https://search.maven.org/artifact/com.khubla.antlr4formatter/antlr4-formatter ) . [ code] ( https://github.com/diffplug/spotless/blob/main/plugin-maven/src/main/java/com/diffplug/spotless/maven/antlr4/Antlr4Formatter.java ) .
345+
346+ ``` xml
347+ <antlr4formatter >
348+ <version >1.2.1</version > <!-- optional -->
349+ </antlr4formatter >
350+ ```
351+
320352<a name =" applying-to-typescript-source " ></a >
321353
322354## Typescript
0 commit comments