Browse Source
Base default style on WebKit and set a few options specific to Devilution. * `AlignTrailingComments: true` * `AllowShortBlocksOnASingleLine: true` * `AllowShortFunctionsOnASingleLine: None` * `PointerAlignment: Right` For header files, we also want to add * `AlignConsecutiveAssignments: true`pull/25/head
1 changed files with 15 additions and 0 deletions
@ -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 |
||||
Loading…
Reference in new issue