A simple Apache Maven plugin to reformat a projects source/test-sources using the google-java-format project to conform with the Google Code Style Guide.
By default the plugin will only process stale source files ( comparing against their respective .class
files existence/timestamp ).
After processing each file, the contents sha1
is compared against the original and only rewritten if they no longer match.
<plugin> <groupId>com.theoryinpractise</groupId> <artifactId>googleformatter-maven-plugin</artifactId> <version>1.7.3</version> <executions> <execution> <id>reformat-sources</id> <configuration> <includeStale>false</includeStale> <style>GOOGLE</style> <formatMain>true</formatMain> <formatTest>true</formatTest> <filterModified>false</filterModified> <skip>false</skip> <fixImports>false</fixImports> <maxLineLength>100</maxLineLength> </configuration> <goals> <goal>format</goal> </goals> <phase>process-sources</phase> </execution> </executions> </plugin>
formatter.modified
to reformat only changed SCM files.formatter.length
as a property<skip>
( and -Dformatter.skip
) configuration setting to skip reformatting code.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4