Created
March 3, 2020 14:50
-
-
Save Calinou/f6340f04ad00490c30a60b227e486051 to your computer and use it in GitHub Desktop.
Portable shell script to format all files in a folder recursively using clang-format
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 | |
set -euo pipefail | |
IFS=$'\n\t' | |
find . \( -name '*.cpp' -o -name '*.hpp' -o -name '*.c' -o -name '*.h' \) \ | |
-exec clang-format -i {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment