google-java-format
google-java-format copied to clipboard
Recursively Formatting
Is it possible to format files in a folder recursively? I tried: java -jar google-java-format-1.19.2-all-deps.jar -replace "folder/extra/*", but it formats only files within this folder and does not format files in inner folders.
There isn't built-in functionality for walking a folder to find files to format. On unix you could consider something like:
find folder/extra/ -type f -name '*.java' | xargs google-java-format -i