aboutsummaryrefslogtreecommitdiff
path: root/test/lint/lint-shell-locale.sh
diff options
context:
space:
mode:
authorEunoia <33084435+Eunoia1729@users.noreply.github.com>2022-04-16 07:42:19 +0000
committerGitHub <noreply@github.com>2022-04-20 14:37:52 +0000
commit2c838cc309b2e3e1e30344178c17f789381a8b6b (patch)
tree9c861b0c13efefd5a07b4524dbcbcf75a05b7958 /test/lint/lint-shell-locale.sh
parent094d9fda5ccee7d78a2e3d8b1eec17b8b6a33466 (diff)
lint: convert shell locale linter test to Python
Diffstat (limited to 'test/lint/lint-shell-locale.sh')
-rwxr-xr-xtest/lint/lint-shell-locale.sh25
1 files changed, 0 insertions, 25 deletions
diff --git a/test/lint/lint-shell-locale.sh b/test/lint/lint-shell-locale.sh
deleted file mode 100755
index 4c6b8a57e6..0000000000
--- a/test/lint/lint-shell-locale.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2018-2020 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#
-# Make sure all shell scripts:
-# a.) explicitly opt out of locale dependence using
-# "export LC_ALL=C" or "export LC_ALL=C.UTF-8", or
-# b.) explicitly opt in to locale dependence using the annotation below.
-
-export LC_ALL=C
-
-EXIT_CODE=0
-for SHELL_SCRIPT in $(git ls-files -- "*.sh" | grep -vE "src/(secp256k1|minisketch|univalue)/"); do
- if grep -q "# This script is intentionally locale dependent by not setting \"export LC_ALL=C\"" "${SHELL_SCRIPT}"; then
- continue
- fi
- FIRST_NON_COMMENT_LINE=$(grep -vE '^(#.*)?$' "${SHELL_SCRIPT}" | head -1)
- if [[ ${FIRST_NON_COMMENT_LINE} != "export LC_ALL=C" && ${FIRST_NON_COMMENT_LINE} != "export LC_ALL=C.UTF-8" ]]; then
- echo "Missing \"export LC_ALL=C\" (to avoid locale dependence) as first non-comment non-empty line in ${SHELL_SCRIPT}"
- EXIT_CODE=1
- fi
-done
-exit ${EXIT_CODE}