Skip to content

Instantly share code, notes, and snippets.

@snimmagadda1
Created March 30, 2023 01:44
Show Gist options
  • Save snimmagadda1/3477c9fe6309328f4a1bd41a970fad29 to your computer and use it in GitHub Desktop.
Save snimmagadda1/3477c9fe6309328f4a1bd41a970fad29 to your computer and use it in GitHub Desktop.
Recursively format all .java files with google-java-format
#!/bin/bash
# Find all Java files in the current directory and its subdirectories
find . -name '*.java' -type f | while read file; do
# Format the Java file using google-java-format
google-java-format -i "$file"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment