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