Move astyle options to a separate file. That way keeping it in sync b… (#1468)
* Move astyle options to a separate file. That way keeping it in sync between different os is more simple.
This commit is contained in:
parent
a3e717bea9
commit
c07cb64f2f
|
@ -0,0 +1,20 @@
|
||||||
|
##############################################################
|
||||||
|
# Documentation is available from #
|
||||||
|
# http://astyle.sourceforge.net/astyle.html #
|
||||||
|
##############################################################
|
||||||
|
|
||||||
|
### Options ###
|
||||||
|
--pad-header
|
||||||
|
--unpad-paren
|
||||||
|
--suffix=none
|
||||||
|
--convert-tabs
|
||||||
|
--attach-inlines
|
||||||
|
--attach-classes
|
||||||
|
--attach-namespaces
|
||||||
|
|
||||||
|
### Settings ###
|
||||||
|
--style=kr
|
||||||
|
--indent=spaces=4
|
||||||
|
--indent-namespaces
|
||||||
|
--lineend=linux
|
||||||
|
--min-conditional-indent=0
|
37
runastyle
37
runastyle
|
@ -17,28 +17,27 @@ if [[ "$DETECTED_VERSION" != ${ASTYLE_VERSION}* ]]; then
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
style="--style=kr --indent=spaces=4 --indent-namespaces --lineend=linux --min-conditional-indent=0"
|
RCFILE=.astylerc
|
||||||
options="--options=none --pad-header --unpad-paren --suffix=none --convert-tabs --attach-inlines --attach-classes --attach-namespaces"
|
|
||||||
|
|
||||||
$ASTYLE $style $options cli/*.cpp
|
$ASTYLE --options=$RCFILE cli/*.cpp
|
||||||
$ASTYLE $style $options cli/*.h
|
$ASTYLE --options=$RCFILE cli/*.h
|
||||||
$ASTYLE $style $options democlient/*.cpp
|
$ASTYLE --options=$RCFILE democlient/*.cpp
|
||||||
$ASTYLE $style $options gui/*.cpp
|
$ASTYLE --options=$RCFILE gui/*.cpp
|
||||||
$ASTYLE $style $options gui/*.h
|
$ASTYLE --options=$RCFILE gui/*.h
|
||||||
$ASTYLE $style $options -r gui/test/*.cpp
|
$ASTYLE --options=$RCFILE -r gui/test/*.cpp
|
||||||
$ASTYLE $style $options -r gui/test/*.h
|
$ASTYLE --options=$RCFILE -r gui/test/*.h
|
||||||
$ASTYLE $style $options lib/*.cpp
|
$ASTYLE --options=$RCFILE lib/*.cpp
|
||||||
$ASTYLE $style $options lib/*.h
|
$ASTYLE --options=$RCFILE lib/*.h
|
||||||
$ASTYLE $style $options test/*.cpp
|
$ASTYLE --options=$RCFILE test/*.cpp
|
||||||
$ASTYLE $style $options test/cfg/*.c
|
$ASTYLE --options=$RCFILE test/cfg/*.c
|
||||||
$ASTYLE $style $options test/cfg/*.cpp
|
$ASTYLE --options=$RCFILE test/cfg/*.cpp
|
||||||
$ASTYLE $style $options test/*.h
|
$ASTYLE --options=$RCFILE test/*.h
|
||||||
|
|
||||||
$ASTYLE $style $options --recursive "tools/*.cpp"
|
$ASTYLE --options=$RCFILE --recursive "tools/*.cpp"
|
||||||
$ASTYLE $style $options --recursive "tools/*.h"
|
$ASTYLE --options=$RCFILE --recursive "tools/*.h"
|
||||||
|
|
||||||
$ASTYLE $style $options --recursive "samples/*.c"
|
$ASTYLE --options=$RCFILE --recursive "samples/*.c"
|
||||||
$ASTYLE $style $options --recursive "samples/*.cpp"
|
$ASTYLE --options=$RCFILE --recursive "samples/*.cpp"
|
||||||
|
|
||||||
# Convert tabs to spaces.. even in strings
|
# Convert tabs to spaces.. even in strings
|
||||||
# sed -i "s/\t/ /g" test/test*.cpp
|
# sed -i "s/\t/ /g" test/test*.cpp
|
||||||
|
|
|
@ -19,28 +19,27 @@
|
||||||
GOTO EXIT_ERROR
|
GOTO EXIT_ERROR
|
||||||
)
|
)
|
||||||
|
|
||||||
@SET STYLE=--style=kr --indent=spaces=4 --indent-namespaces --lineend=linux --min-conditional-indent=0
|
@SET RCFILE=.astylerc
|
||||||
@SET OPTIONS=--pad-header --unpad-paren --suffix=none --convert-tabs --attach-inlines --attach-classes --attach-namespaces
|
|
||||||
|
|
||||||
%ASTYLE% %STYLE% %OPTIONS% cli/*.cpp
|
%ASTYLE% --options=%RCFILE% cli/*.cpp
|
||||||
%ASTYLE% %STYLE% %OPTIONS% cli/*.h
|
%ASTYLE% --options=%RCFILE% cli/*.h
|
||||||
%ASTYLE% %STYLE% %OPTIONS% democlient/*.cpp
|
%ASTYLE% --options=%RCFILE% democlient/*.cpp
|
||||||
%ASTYLE% %STYLE% %OPTIONS% gui/*.cpp
|
%ASTYLE% --options=%RCFILE% gui/*.cpp
|
||||||
%ASTYLE% %STYLE% %OPTIONS% gui/*.h
|
%ASTYLE% --options=%RCFILE% gui/*.h
|
||||||
%ASTYLE% %STYLE% %OPTIONS% -r gui/test/*.cpp
|
%ASTYLE% --options=%RCFILE% -r gui/test/*.cpp
|
||||||
%ASTYLE% %STYLE% %OPTIONS% -r gui/test/*.h
|
%ASTYLE% --options=%RCFILE% -r gui/test/*.h
|
||||||
%ASTYLE% %STYLE% %OPTIONS% lib/*.cpp
|
%ASTYLE% --options=%RCFILE% lib/*.cpp
|
||||||
%ASTYLE% %STYLE% %OPTIONS% lib/*.h
|
%ASTYLE% --options=%RCFILE% lib/*.h
|
||||||
%ASTYLE% %STYLE% %OPTIONS% test/*.cpp
|
%ASTYLE% --options=%RCFILE% test/*.cpp
|
||||||
%ASTYLE% %STYLE% %OPTIONS% test/cfg/*.c
|
%ASTYLE% --options=%RCFILE% test/cfg/*.c
|
||||||
%ASTYLE% %STYLE% %OPTIONS% test/cfg/*.cpp
|
%ASTYLE% --options=%RCFILE% test/cfg/*.cpp
|
||||||
%ASTYLE% %STYLE% %OPTIONS% test/*.h
|
%ASTYLE% --options=%RCFILE% test/*.h
|
||||||
|
|
||||||
%ASTYLE% %STYLE% %OPTIONS% -r tools/*.cpp
|
%ASTYLE% --options=%RCFILE% -r tools/*.cpp
|
||||||
%ASTYLE% %STYLE% %OPTIONS% -r tools/*.h
|
%ASTYLE% --options=%RCFILE% -r tools/*.h
|
||||||
|
|
||||||
%ASTYLE% %STYLE% %OPTIONS% -r samples/*.c
|
%ASTYLE% --options=%RCFILE% -r samples/*.c
|
||||||
%ASTYLE% %STYLE% %OPTIONS% -r samples/*.cpp
|
%ASTYLE% --options=%RCFILE% -r samples/*.cpp
|
||||||
|
|
||||||
@REM Format configuration files
|
@REM Format configuration files
|
||||||
@SET XMLLINT=xmllint
|
@SET XMLLINT=xmllint
|
||||||
|
|
Loading…
Reference in New Issue