prime/tools/clang-format.sh
Luke Street 234afca6c2 clang-format pass
Former-commit-id: 6a979e343f6a88e4c9b78d3917c1fabfcb211a0a
2022-09-18 02:05:46 -04:00

16 lines
255 B
Bash
Executable File

#!/bin/bash -e
function add_newline {
if [[ -z "$(tail -c 1 "$1")" ]]; then
:
else
echo >> "$1"
fi
}
FILES=$(git ls-files -c "*.h" "*.hpp" "*.c" "*.cpp")
clang-format -i ${FILES}
for f in ${FILES}; do
add_newline $f
done