moving astyle options into astyle options file, adding sublime settings for astyle formatter plugin

This commit is contained in:
Andreas Antener 2015-08-18 11:40:01 +02:00
parent 1b50aba43f
commit 9ad5dfc928
3 changed files with 34 additions and 19 deletions

View File

@ -33,7 +33,20 @@
{
"tab_size": 8,
"translate_tabs_to_spaces": false,
"highlight_line": true
"highlight_line": true,
"AStyleFormatter":
{
"options_c":
{
"use_only_additional_options": true,
"additional_options_file": "${project_path}/Tools/astylerc"
},
"options_c++":
{
"use_only_additional_options": true,
"additional_options_file": "${project_path}/Tools/astylerc"
}
}
},
"build_systems":
[

18
Tools/astylerc Normal file
View File

@ -0,0 +1,18 @@
indent=force-tab=8
style=linux
indent-preprocessor
indent-cases
break-blocks=all
pad-oper
pad-header
unpad-paren
keep-one-line-blocks
keep-one-line-statements
align-pointer=name
align-reference=name
-n #--suffix=none
ignore-exclude-errors-x
lineend=linux
exclude=EASTL
add-brackets
max-code-length=120

View File

@ -1,22 +1,6 @@
#!/bin/sh
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
astyle \
--style=linux \
--indent=force-tab=8 \
--indent-cases \
--indent-preprocessor \
--break-blocks=all \
--pad-oper \
--pad-header \
--unpad-paren \
--keep-one-line-blocks \
--keep-one-line-statements \
--align-pointer=name \
--align-reference=name \
--suffix=none \
--ignore-exclude-errors-x \
--lineend=linux \
--exclude=EASTL \
--add-brackets \
--max-code-length=120 \
--options=$DIR/astylerc \
--preserve-date \
$*