Created
July 6, 2016 22:29
-
-
Save k4rtik/a4019186ac5e54852449e245a206960a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# note: clang-tidy only accepts one file at a time, but we can run it | |
# parallel against disjoint collections at once. | |
find . \( -name \*.c -or -name \*.cpp -or -name \*.cc -or -name \*.h \) | xargs -n1 -P4 cleanup-tidy | |
# clang-format accepts multiple files during one run, but let's limit it to 12 | |
# here so we (hopefully) avoid excessive memory usage. | |
find . \( -name \*.c -or -name \*.cpp -or -name \*.cc -or -name \*.h \) | xargs -n12 -P4 cleanup-format -i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment