cppcheck/runastyle

32 lines
1018 B
Bash
Executable File

#!/bin/bash
# The version check in this script is used to avoid commit battles
# between different developers that use different astyle versions as
# different versions might have different output (this has happened in
# the past).
# If project management wishes to take a newer astyle version into use
# just change this string to match astyle version string.
ASTYLE_VERSION="Artistic Style Version 2.01"
if [ "`astyle --version 2>&1`" != "${ASTYLE_VERSION}" ]; then
echo "You should use: ${ASTYLE_VERSION}";
exit 1;
fi
style="--style=ansi --lineend=linux --min-conditional-indent=0"
options="--pad-header --unpad-paren --suffix=none"
astyle $style $options cli/*.cpp
astyle $style $options cli/*.h
astyle $style $options gui/*.cpp
astyle $style $options gui/*.h
astyle $style $options -r gui/test/*.cpp
astyle $style $options -r gui/test/*.h
astyle $style $options lib/*.cpp
astyle $style $options lib/*.h
astyle $style $options test/*.cpp
astyle $style $options test/*.h
astyle $style $options tools/*.cpp