From 038997ff45b285b3144604a7fda82685ad462b7c Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Thu, 16 May 2019 11:02:11 -0400 Subject: [PATCH] Merge #16036: travis: Run all lint scripts even if one fails f3b90f2e05 Run all lint scripts (Julian Fleischer) Pull request description: 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. ACKs for commit f3b90f: Tree-SHA512: 4f1f6435855dd5074a38c5887be6f096ec66f4dbe8712bdfd5fed0c510f1b2c083b7318cf3bfbdcc85982429fb7b4309e57ce48cc11736c86376658ec7ffea8f --- 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 7c4f96cb3b..fabc24c91b 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}