diff --git a/format.sh b/format.sh new file mode 100755 index 000000000..66c6de538 --- /dev/null +++ b/format.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +CPP_DONE="Source/doom.cpp Source/movie.cpp Source/pfile.cpp Source/player.cpp Source/plrmsg.cpp Source/sound.cpp Source/spells.cpp Source/tmsg.cpp" + +for f in $CPP_DONE; do + echo "Formatting $f" + clang-format -style="{BasedOnStyle: webkit, AlignTrailingComments: true, AllowShortBlocksOnASingleLine: true, AllowShortFunctionsOnASingleLine: None, PointerAlignment: Right}" -i $f +done + +H_DONE="enums.h structs.h" + +for f in $H_DONE; do + echo "Formatting $f" + clang-format -style="{BasedOnStyle: webkit, AlignTrailingComments: true, AllowShortBlocksOnASingleLine: true, AllowShortFunctionsOnASingleLine: None, PointerAlignment: Right, AlignConsecutiveAssignments: true}" -i $f +done