Last active
December 3, 2022 18:53
-
-
Save domfarolino/8492f28115cda11e7be4ab3f1484e8a7 to your computer and use it in GitHub Desktop.
clang-format on all C++ files in a directory
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
find . -maxdepth 20 -name \*.cc -not -path "./bazel*" -exec clang-format -i --style=Chromium {} > file \; | |
find . -maxdepth 20 -name \*.h -not -path "./bazel*" -exec clang-format -i --style=Chromium {} > file \; | |
# From https://stackoverflow.com/questions/28896909/ | |
# find $PWD/base -type f \( -name "*.h" -o -name "*.cpp" \) -exec clang-format -style=Chromium --dry-run --Werror {} + |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment