aboutsummaryrefslogtreecommitdiff
path: root/test/lint
diff options
context:
space:
mode:
authorJulian Fleischer <scravy@users.noreply.github.com>2019-05-16 16:42:59 +0200
committerGitHub <noreply@github.com>2019-05-16 16:42:59 +0200
commitf3b90f2e053816bfb64dce577b0913d920f362f8 (patch)
treefbb91219f22d23b41e8dc292d8b8fdf5f171e66c /test/lint
parentfd61b9fc22faaa946ca43211c6c43b40ca4a860c (diff)
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.
Diffstat (limited to 'test/lint')
-rwxr-xr-xtest/lint/lint-all.sh8
1 files 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}