Skip to content

Commit

Permalink
lint: Remove some subtrees from exclusion
Browse files Browse the repository at this point in the history
Either they don't violate the lints, or can be easily fixed.

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
  • Loading branch information
str4d and daira authored Nov 9, 2020
1 parent 5b543b1 commit 1e6d183
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/lint/lint-include-guards.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
2 changes: 1 addition & 1 deletion test/lint/lint-includes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/lint/lint-shell-locale.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/lint/lint-shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
4 changes: 2 additions & 2 deletions test/lint/lint-whitespace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1e6d183

Please sign in to comment.