summaryrefslogtreecommitdiff
path: root/format_sources
blob: 597d563f8317e5464e858f98c7ebbb3c3c7ced38 (plain)
1
2
3
4
5
6
7
# clang-format's assume-filename seems to be broken
# we must not specify the path to $TMPFILE directly, as clang-format would then
# look in that folder for the config file. Instead, we want it to use the current
# CWD which can be achieved by piping in the file. But then we need to overwrite
# the original file again, which can be done with sponge easily
src/*.cpp src/*.h tests/*.h tests/*.cpp : clang-format < $TMPFILE | sponge $TMPFILE