diff --git a/scripts/astyle.options b/scripts/astyle.options new file mode 100644 index 00000000000..1c46ce82a9c --- /dev/null +++ b/scripts/astyle.options @@ -0,0 +1,16 @@ +--preserve-date +--indent-preprocessor +--brackets=break +--convert-tabs +--indent=spaces=2 +--indent-classes +--indent-labels +--indent-namespaces +--indent-switches +--one-line=keep-blocks +--max-instatement-indent=40 +--min-conditional-indent=-1 +--suffix=none +--pad=oper +--pad=paren-in +--unpad=paren diff --git a/scripts/astyle.sh b/scripts/astyle.sh index 39ff1c25098..9883eb33505 100755 --- a/scripts/astyle.sh +++ b/scripts/astyle.sh @@ -53,22 +53,8 @@ set -e astyleit() { $ASTYLE \ - --preserve-date \ - --indent-preprocessor \ - --brackets=break \ - --convert-tabs \ - --indent=spaces=2 \ - --indent-classes \ - --indent-labels \ - --indent-namespaces \ - --indent-switches \ - --one-line=keep-blocks \ - --max-instatement-indent=40 \ - --min-conditional-indent=-1 \ - --suffix=none \ - --pad=oper \ - --pad=paren-in \ - --unpad=paren "$1" + "--options=$(dirname $0)/astyle.options" \ + "$1" scripts/unify_includes.pl "$1" }