From 9de157fdc58a9d1956c75e42f8834bfbf08c062e Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Wed, 4 Mar 2020 10:37:01 -0500 Subject: [PATCH] cleanup and document check_indentation.sh --- contrib/utilities/check_indentation.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/contrib/utilities/check_indentation.sh b/contrib/utilities/check_indentation.sh index fb5fa97f11..f2a353ef91 100755 --- a/contrib/utilities/check_indentation.sh +++ b/contrib/utilities/check_indentation.sh @@ -17,15 +17,12 @@ # # This is a script that is used by the continuous integration servers # to make sure that the currently checked out version of a git repository -# satisfies our indentation standards. +# satisfies our "indentation" standards. This does no longer only cover +# indentation, but other automated checks as well. # -# It does so by running the 'indent' script (located in the current -# directory), calling 'git diff' to show what differences exist between -# the correctly indented code and what is in the git index (which is -# typically what is in the last commit), and then running a command -# that either returns success or failure, depending on whether or not -# there are differences. The continuous integration services return -# a failure code for a pull request if this script returns a failure. +# WARNING: The continuous integration services return a failure code for a +# pull request if this script returns a failure, so the return value of this +# script is important. # if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then @@ -34,8 +31,17 @@ else echo "Running indentation test on Pull Request #${TRAVIS_PULL_REQUEST}" fi +# Run indent-all and fail if script fails: ./contrib/utilities/indent-all || exit $? + +# Show the diff in the output: git diff + +# Make this script fail if any changes were applied by indent above: git diff-files --quiet || exit $? +# Run various checks involving doxygen documentation: ./contrib/utilities/check_doxygen.sh || exit $? + +# Success! +exit 0 -- 2.39.5