"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "runastyle" between
cppcheck-1.86.tar.gz and cppcheck-1.87.tar.gz

About: Cppcheck is a static analysis tool for C/C++ code. It checks for memory leaks, mismatching allocation-deallocation, buffer overrun, and many more.

runastyle  (cppcheck-1.86):runastyle  (cppcheck-1.87)
skipping to change at line 14 skipping to change at line 14
# different versions might have different output (this has happened in # different versions might have different output (this has happened in
# the past). # the past).
# If project management wishes to take a newer astyle version into use # If project management wishes to take a newer astyle version into use
# just change this string to match the start of astyle version string. # just change this string to match the start of astyle version string.
ASTYLE_VERSION="3.0.1" ASTYLE_VERSION="3.0.1"
ASTYLE="${ASTYLE-astyle}" ASTYLE="${ASTYLE-astyle}"
DETECTED_VERSION=$("$ASTYLE" --version 2>&1 | awk '{ print $NF; }') DETECTED_VERSION=$("$ASTYLE" --version 2>&1 | awk '{ print $NF; }')
if [ "$DETECTED_VERSION" != "${ASTYLE_VERSION}" ]; then if [ "$DETECTED_VERSION" != "${ASTYLE_VERSION}" ]; then
echo "You should use version: ${ASTYLE_VERSION}" echo "You should use version: ${ASTYLE_VERSION}"
echo "Detected version: ${DETECTED_VERSION}" echo "Detected version: ${DETECTED_VERSION}"
exit 1 exit 1
fi fi
RCFILE=.astylerc RCFILE=.astylerc
"$ASTYLE" --options=$RCFILE cli/*.cpp #
"$ASTYLE" --options=$RCFILE cli/*.h # Functions to format C/C++ source code
"$ASTYLE" --options=$RCFILE democlient/*.cpp #
"$ASTYLE" --options=$RCFILE gui/*.cpp function formatCplusplus {
"$ASTYLE" --options=$RCFILE gui/*.h "$ASTYLE" --options=$RCFILE "$1"
"$ASTYLE" --options=$RCFILE --recursive "gui/test/*.cpp" }
"$ASTYLE" --options=$RCFILE --recursive "gui/test/*.h" function formatCplusplusRecursive {
"$ASTYLE" --options=$RCFILE lib/*.cpp RCFILE=.astylerc
"$ASTYLE" --options=$RCFILE lib/*.h "$ASTYLE" --options=$RCFILE --recursive "$1"
"$ASTYLE" --options=$RCFILE test/*.cpp }
"$ASTYLE" --options=$RCFILE test/cfg/*.c
"$ASTYLE" --options=$RCFILE test/cfg/*.cpp #
"$ASTYLE" --options=$RCFILE test/*.h # Function to format XML files
#
"$ASTYLE" --options=$RCFILE --recursive "tools/*.cpp" function formatXML {
"$ASTYLE" --options=$RCFILE --recursive "tools/*.h" xmllint --format -o "$1_" "$1"
if cmp -s "$1_" "$1"; then
"$ASTYLE" --options=$RCFILE --recursive "samples/*.c" rm -f "$1_"
"$ASTYLE" --options=$RCFILE --recursive "samples/*.cpp" echo Unchanged $1
else
# Convert tabs to spaces.. even in strings mv -f "$1_" "$1"
# sed -i "s/\t/ /g" test/test*.cpp echo Formatted $1
fi
}
formatCplusplus "cli/*.cpp"
formatCplusplus "cli/*.h"
formatCplusplus "democlient/*.cpp"
formatCplusplus "gui/*.cpp"
formatCplusplus "gui/*.h"
formatCplusplusRecursive "gui/test/*.cpp"
formatCplusplusRecursive "gui/test/*.h"
formatCplusplus "lib/*.cpp"
formatCplusplus "lib/*.h"
formatCplusplus "test/*.cpp"
formatCplusplus "test/cfg/*.c"
formatCplusplus "test/cfg/*.cpp"
formatCplusplus "test/*.h"
formatCplusplus "tools/*.cpp"
formatCplusplusRecursive "tools/*.h"
formatCplusplusRecursive "samples/*.c"
formatCplusplusRecursive "samples/*.cpp"
# format config files # format config files
# TODO: use other tool than xmllint? use tabs instead of spaces? # TODO: use other tool than xmllint? use tabs instead of spaces?
for CFGFILE in cfg/*.cfg for CFGFILE in cfg/*.cfg
do do
xmllint --format -o "${CFGFILE}_" "$CFGFILE" formatXML "$CFGFILE"
mv -f "${CFGFILE}_" "$CFGFILE"
done done
for PLATFORMFILE in platforms/*.xml for PLATFORMFILE in platforms/*.xml
do do
xmllint --format -o "${PLATFORMFILE}_" "$PLATFORMFILE" formatXML "$PLATFORMFILE"
mv -f "${PLATFORMFILE}_" "$PLATFORMFILE"
done done
xmllint --format -o man/cppcheck.1.xml_ man/cppcheck.1.xml formatXML man/cppcheck.1.xml
mv -f man/cppcheck.1.xml_ man/cppcheck.1.xml formatXML cppcheck-errors.rng
xmllint --format -o cppcheck-errors_.rng cppcheck-errors.rng
mv cppcheck-errors_.rng cppcheck-errors.rng
 End of changes. 5 change blocks. 
29 lines changed or deleted 47 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)