mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-28 05:13:03 +02:00
fac23c211407a77af82bb1491c48c8d37022c8b3 scripted-diff: Bump copyright headers (MarcoFalke) fa974f1f1417a536636347072e86bcb54a4c909c scripted-diff: Remove redundant sync_all and sync_blocks (MarcoFalke) fad13991aea6463ecf07dd907de1c1b23837d7e7 test: Properly set sync_fun in NodeNetworkLimitedTest (MarcoFalke) faeff577093c4de9eec9491486a2c3766d46dae6 test: Use 4 spaces for indentation (MarcoFalke) Pull request description: Some cleanups after commit 94db963de501e4aba6e5d8150a01ceb85753dee1 ACKs for top commit: fanquake: ACK fac23c211407a77af82bb1491c48c8d37022c8b3 Tree-SHA512: 5acfd5bb9679b41969d0fc6fc85801ccadcd6530ea692bac6352668e06fc7a9b0e1db3fd6fba435e84afe983d2eb07bd0a47c8364462bb7110004bd3d102b698
33 lines
1021 B
Bash
Executable File
33 lines
1021 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Copyright (c) 2018-2021 The Bitcoin Core developers
|
|
# Distributed under the MIT software license, see the accompanying
|
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
#
|
|
# Check for shellcheck warnings in shell scripts.
|
|
|
|
export LC_ALL=C
|
|
|
|
# Disabled warnings:
|
|
disabled=(
|
|
SC2162 # read without -r will mangle backslashes.
|
|
)
|
|
|
|
EXIT_CODE=0
|
|
|
|
if ! command -v shellcheck > /dev/null; then
|
|
echo "Skipping shell linting since shellcheck is not installed."
|
|
exit $EXIT_CODE
|
|
fi
|
|
|
|
SHELLCHECK_CMD=(shellcheck --external-sources --check-sourced)
|
|
EXCLUDE="--exclude=$(IFS=','; echo "${disabled[*]}")"
|
|
# Check shellcheck directive used for sourced files
|
|
mapfile -t SOURCED_FILES < <(git ls-files | xargs gawk '/^# shellcheck shell=/ {print FILENAME} {nextfile}')
|
|
mapfile -t FILES < <(git ls-files -- '*.sh' | grep -vE 'src/(leveldb|secp256k1|minisketch|univalue)/')
|
|
if ! "${SHELLCHECK_CMD[@]}" "$EXCLUDE" "${SOURCED_FILES[@]}" "${FILES[@]}"; then
|
|
EXIT_CODE=1
|
|
fi
|
|
|
|
exit $EXIT_CODE
|