From 1e6d1837a0f65cd54c604fddeb9d973e8f576f96 Mon Sep 17 00:00:00 2001 From: str4d Date: Mon, 9 Nov 2020 20:06:45 +0000 Subject: [PATCH] lint: Remove some subtrees from exclusion Either they don't violate the lints, or can be easily fixed. Co-authored-by: Daira Hopwood --- test/lint/lint-include-guards.sh | 2 +- test/lint/lint-includes.sh | 2 +- test/lint/lint-shell-locale.sh | 2 +- test/lint/lint-shell.sh | 2 +- test/lint/lint-whitespace.sh | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/lint/lint-include-guards.sh b/test/lint/lint-include-guards.sh index 950e8b664..93d252e34 100755 --- a/test/lint/lint-include-guards.sh +++ b/test/lint/lint-include-guards.sh @@ -12,7 +12,7 @@ HEADER_ID_PREFIX="ZCASH_" HEADER_ID_PREFIX_UPSTREAM="BITCOIN_" HEADER_ID_SUFFIX="_H" -REGEXP_EXCLUDE_FILES_WITH_PREFIX="src/(crypto/ctaes/|leveldb/|rust/|secp256k1/|tinyformat.h|univalue/)" +REGEXP_EXCLUDE_FILES_WITH_PREFIX="src/(leveldb/|secp256k1/|univalue/)" EXIT_CODE=0 for HEADER_FILE in $(git ls-files -- "*.h" | grep -vE "^${REGEXP_EXCLUDE_FILES_WITH_PREFIX}") diff --git a/test/lint/lint-includes.sh b/test/lint/lint-includes.sh index 513ac7237..ea00d0def 100755 --- a/test/lint/lint-includes.sh +++ b/test/lint/lint-includes.sh @@ -13,7 +13,7 @@ export LC_ALL=C cd "$(dirname $0)/../.." || exit 1 filter_suffix() { - git ls-files | grep -E "^src/.*\.${1}"'$' | grep -Ev "/(leveldb|secp256k1|univalue)/" + git ls-files | grep -E "^src/.*\.${1}"'$' } EXIT_CODE=0 diff --git a/test/lint/lint-shell-locale.sh b/test/lint/lint-shell-locale.sh index f4ef7698a..b06b4c537 100755 --- a/test/lint/lint-shell-locale.sh +++ b/test/lint/lint-shell-locale.sh @@ -12,7 +12,7 @@ export LC_ALL=C EXIT_CODE=0 -for SHELL_SCRIPT in $(git ls-files -- "*.sh" | grep -vE "src/(secp256k1|univalue)/"); do +for SHELL_SCRIPT in $(git ls-files -- "*.sh"); do if grep -q "# This script is intentionally locale-dependent by not setting \"export LC_ALL=C\"." "${SHELL_SCRIPT}"; then continue fi diff --git a/test/lint/lint-shell.sh b/test/lint/lint-shell.sh index 6f5e6546c..a59720461 100755 --- a/test/lint/lint-shell.sh +++ b/test/lint/lint-shell.sh @@ -44,4 +44,4 @@ disabled=( SC2236 # Don't force -n instead of ! -z. ) shellcheck -e "$(IFS=","; echo "${disabled[*]}")" \ - $(git ls-files -- "*.sh" | grep -vE 'src/(secp256k1|univalue)/') + $(git ls-files -- "*.sh") diff --git a/test/lint/lint-whitespace.sh b/test/lint/lint-whitespace.sh index f318e1907..2cc96267d 100755 --- a/test/lint/lint-whitespace.sh +++ b/test/lint/lint-whitespace.sh @@ -31,14 +31,14 @@ if [ -z "${TRAVIS_COMMIT_RANGE}" ]; then fi showdiff() { - if ! git diff -U0 "${TRAVIS_COMMIT_RANGE}" -- "." ":(exclude)depends/patches/" ":(exclude)src/leveldb/" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/" ":(exclude)doc/release-notes/"; then + if ! git diff -U0 "${TRAVIS_COMMIT_RANGE}" -- "." ":(exclude)depends/patches/" ":(exclude)doc/release-notes/"; then echo "Failed to get a diff" exit 1 fi } showcodediff() { - if ! git diff -U0 "${TRAVIS_COMMIT_RANGE}" -- *.cpp *.h *.md *.py *.sh ":(exclude)src/leveldb/" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/" ":(exclude)doc/release-notes/"; then + if ! git diff -U0 "${TRAVIS_COMMIT_RANGE}" -- *.cpp *.h *.md *.py *.sh ":(exclude)doc/release-notes/"; then echo "Failed to get a diff" exit 1 fi