From f3b90f2e053816bfb64dce577b0913d920f362f8 Mon Sep 17 00:00:00 2001 From: Julian Fleischer Date: Thu, 16 May 2019 16:42:59 +0200 Subject: [PATCH] Run all lint scripts The description reads: ``` # This script runs all contrib/devtools/lint-*.sh files, and fails if any exit # with a non-zero status code. ``` This runs all scripts and returns with a non-zero exit code if any failed. --- test/lint/lint-all.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/lint/lint-all.sh b/test/lint/lint-all.sh index 7c4f96cb3b0..fabc24c91bc 100755 --- a/test/lint/lint-all.sh +++ b/test/lint/lint-all.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2017 The Bitcoin Core developers +# Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # @@ -16,11 +16,15 @@ set -u SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}") LINTALL=$(basename "${BASH_SOURCE[0]}") +EXIT_CODE=0 + for f in "${SCRIPTDIR}"/lint-*.sh; do if [ "$(basename "$f")" != "$LINTALL" ]; then if ! "$f"; then echo "^---- failure generated from $f" - exit 1 + EXIT_CODE=1 fi fi done + +exit ${EXIT_CODE}