Skip to content

Instantly share code, notes, and snippets.

@Chocobo1
Last active August 16, 2016 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Chocobo1/539cee860d1eef0acfa6 to your computer and use it in GitHub Desktop.
Save Chocobo1/539cee860d1eef0acfa6 to your computer and use it in GitHub Desktop.
#!/bin/sh
# run 2 times, because one formatter output should be checked again by another formatter
for _ in 1 2; do
astyle --verbose --formatted --preserve-date --suffix=none --style=kr --max-instatement-indent=120 --indent=spaces=4 --indent-namespaces --pad-oper --pad-header --unpad-paren --break-closing-brackets --remove-brackets --keep-one-line-blocks --keep-one-line-statements "$1"
echo
uncrustify -c uncrustify.cfg --no-backup "$1"
echo
echo
done
# note: check `enum {}` blocks after applying astyle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment