-
Story
-
Resolution: Done
-
Low
-
None
-
None
Add maven plugins that reuse Eclipse formatter configurations.
The Eclipse formatter configuration can be used interactively in Eclipse while editing code.
The maven plugins can do batch re-formatting on existing code.
The formatter configuration can be committed into the code repo for all to share and use consistently across the projects.
The command "mvn formatter:format spotless:apply" produces output like below:
[INFO] --- formatter-maven-plugin:2.8.1:format (default-cli) @ aai-traversal --- [INFO] Using 'UTF-8' encoding to format source files. [INFO] Number of files to be formatted: 211 [INFO] Successfully formatted: 211 file(s) [INFO] Fail to format: 0 file(s) [INFO] Skipped: 0 file(s) [INFO] Read only skipped: 0 file(s) [INFO] Approximate time taken: 4s [INFO] [INFO] --- spotless-maven-plugin:1.18.0:apply (default-cli) @ aai-traversal --- [INFO]
The quality of the result can be gauged by triggering the checkstyle audit with "mvn process-sources".