@@ -187,6 +187,7 @@ Spotless CLI supports the following formatter steps in alphabetical order:
187187
188188-  [ clang-format] ( #clang-format ) 
189189-  [ clean-that] ( #clean-that ) 
190+ -  [ eclipse-wtp] ( #eclipse-wtp ) 
190191-  [ format-annotations] ( #format-annotations ) 
191192-  [ google-java-format] ( #google-java-format ) 
192193-  [ license-header] ( #license-header ) 
@@ -312,6 +313,74 @@ Example usage:
312313spotless --target ' **/src/**/*.java' 
313314``` 
314315
316+ ### eclipse-wtp  
317+ 
318+ <!-- -freshmark eclipsewtpshields
319+ output = [ 
320+   link(shield('spotless eclipse wtp version', 'spotless-eclipse-wtp', '{{libs.versions.native.include.spotlessEclipseWtp}}', 'blue'), 'https://central.sonatype.com/artifact/com.diffplug.spotless/spotless-eclipse-wtp/{{libs.versions.native.include.spotlessEclipseWtp}}'), 
321+   link(shield('eclipse wtp version', 'eclipse-wtp-formatter', '{{libs.versions.native.include.spotlessEclipseWtpFormatter}}', 'blue'), 'https://github.com/diffplug/spotless/blob/main/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_wtp_formatter/v{{libs.versions.native.include.spotlessEclipseWtpFormatter}}'), 
322+   ].join('\n') 
323+ --> 
324+ 
325+ [ ![ spotless eclipse wtp version] ( https://img.shields.io/badge/spotless--eclipse--wtp-3.23.0-blue.svg )] ( https://central.sonatype.com/artifact/com.diffplug.spotless/spotless-eclipse-wtp/3.23.0 ) 
326+ [ ![ eclipse wtp version] ( https://img.shields.io/badge/eclipse--wtp--formatter-4.21.0-blue.svg )] ( https://github.com/diffplug/spotless/blob/main/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_wtp_formatter/v4.21.0 ) 
327+ 
328+ <!-- -freshmark /eclipsewtpshields --> 
329+ 
330+ The [ eclipse web tools platform (WTP)] ( https://projects.eclipse.org/projects/webtools )  formatter is a formatter for web files such as HTML, CSS, JavaScript, JSON, XML and XHTML.
331+ 
332+ It comes with reasonable defaults but can be configured using configuration files. For details see the [ spotless documentation] ( https://github.com/diffplug/spotless/tree/main/plugin-gradle#eclipse-web-tools-platform ) .
333+ 
334+ To see usage instructions for the eclipse-wtp formatter, run: ` spotless eclipse-wtp --help ` 
335+ 
336+ <!-- -freshmark usage_eclipse_wtp
337+ output = 
338+    '```\n' + 
339+    {{usage.eclipse-wtp.array}}.join('\n') + 
340+     '\n```'; 
341+ --> 
342+ 
343+ ``` 
344+ Usage: spotless eclipse-wtp [-hV] [-f]... [-t=<type>] 
345+ Runs Eclipse WTP formatter (4.21.0) 
346+   -f, --config-file   The path to the Eclipse WTP configuration file. For 
347+                         supported config file options see spotless 
348+                         documentation (additional info links). 
349+   -h, --help          Show this help message and exit. 
350+   -t, --type=<type>   The type of the Eclipse WTP formatter. If not provided, 
351+                         the type will be guessed based on the first few files 
352+                         we find. If that does not work, we fail the formatting 
353+                         run. 
354+                       One of: CSS, HTML, JS, JSON, XML, XHTML 
355+   -V, --version       Print version information and exit. 
356+ 
357+ ✅ This step supports the following file types: 
358+    * css 
359+    * html 
360+    * js 
361+    * json 
362+    * xml 
363+    * xhtml 
364+ 
365+ 🌎 Additional info: 
366+    * https://github.com/diffplug/spotless/tree/main/plugin-gradle#eclipse-web-to 
367+     ols-platform 
368+ 
369+    * https://projects.eclipse.org/projects/webtools 
370+ ``` 
371+ 
372+ <!-- -freshmark /usage_eclipse_wtp --> 
373+ 
374+ Example usage:
375+ 
376+ ``` shell 
377+ #  format all js files using (multiple) project-specific configuration files
378+ #  for details regarding the configuration files see the spotless documentation
379+ spotless --target ' **/*.js' 
380+ #  or use defaults and infer type from files
381+ spotless --target ' **/*.css' 
382+ ``` 
383+ 
315384### format-annotations  
316385
317386In Java, type annotations should be on the same line as the type that they qualify. This formatter fixes this for you.
0 commit comments