Skip to content

Commit

Permalink
add initial fix_code_syle.sh script
Browse files Browse the repository at this point in the history
You need to have astyle installed.
Run with ./fix_code_style.sh <FILENAME>
  • Loading branch information
flixr committed Sep 10, 2014
1 parent 5b7ef47 commit 04bd833
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions fix_code_style.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
astyle \
--style=kr \
--indent=spaces=2 \
--convert-tabs \
--indent-switches \
--indent-preprocessor \
--pad-oper \
--pad-header \
--unpad-paren \
--keep-one-line-blocks \
--keep-one-line-statements \
--align-pointer=name \
--suffix=none \
--lineend=linux \
--add-brackets \
$*

# options that don't seem to be supported by astyle 2.01
# --attach-extern-c --align-reference=name --ignore-exclude-errors-x --max-code-length=120

0 comments on commit 04bd833

Please sign in to comment.