From fa82e890e7950fe5ba6d4fa88fcd922cc929dc47 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 4 Apr 2022 16:57:10 +0200 Subject: [PATCH] Move lint script and data file to avoid lint- prefix This is needed for the next commit --- test/lint/lint-format-strings.sh | 4 ++-- test/lint/lint-spelling.sh | 2 +- .../{lint-format-strings.py => run-lint-format-strings.py} | 0 ...nt-spelling.ignore-words.txt => spelling.ignore-words.txt} | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename test/lint/{lint-format-strings.py => run-lint-format-strings.py} (100%) rename test/lint/{lint-spelling.ignore-words.txt => spelling.ignore-words.txt} (100%) diff --git a/test/lint/lint-format-strings.sh b/test/lint/lint-format-strings.sh index d98f12b1a1b..73730f16b30 100755 --- a/test/lint/lint-format-strings.sh +++ b/test/lint/lint-format-strings.sh @@ -29,7 +29,7 @@ FUNCTION_NAMES_AND_NUMBER_OF_LEADING_ARGUMENTS=( ) EXIT_CODE=0 -if ! python3 -m doctest test/lint/lint-format-strings.py; then +if ! python3 -m doctest "test/lint/run-lint-format-strings.py"; then EXIT_CODE=1 fi for S in "${FUNCTION_NAMES_AND_NUMBER_OF_LEADING_ARGUMENTS[@]}"; do @@ -37,7 +37,7 @@ for S in "${FUNCTION_NAMES_AND_NUMBER_OF_LEADING_ARGUMENTS[@]}"; do for MATCHING_FILE in $(git grep --full-name -l "${FUNCTION_NAME}" -- "*.c" "*.cpp" "*.h" | sort | grep -vE "^src/(leveldb|secp256k1|minisketch|tinyformat|univalue|test/fuzz/strprintf.cpp)"); do MATCHING_FILES+=("${MATCHING_FILE}") done - if ! test/lint/lint-format-strings.py --skip-arguments "${SKIP_ARGUMENTS}" "${FUNCTION_NAME}" "${MATCHING_FILES[@]}"; then + if ! "test/lint/run-lint-format-strings.py" --skip-arguments "${SKIP_ARGUMENTS}" "${FUNCTION_NAME}" "${MATCHING_FILES[@]}"; then EXIT_CODE=1 fi done diff --git a/test/lint/lint-spelling.sh b/test/lint/lint-spelling.sh index b3e558b02a2..8808fbc3c6e 100755 --- a/test/lint/lint-spelling.sh +++ b/test/lint/lint-spelling.sh @@ -14,7 +14,7 @@ if ! command -v codespell > /dev/null; then exit 0 fi -IGNORE_WORDS_FILE=test/lint/lint-spelling.ignore-words.txt +IGNORE_WORDS_FILE="test/lint/spelling.ignore-words.txt" mapfile -t FILES < <(git ls-files -- ":(exclude)build-aux/m4/" ":(exclude)contrib/seeds/*.txt" ":(exclude)depends/" ":(exclude)doc/release-notes/" ":(exclude)src/leveldb/" ":(exclude)src/crc32c/" ":(exclude)src/qt/locale/" ":(exclude)src/qt/*.qrc" ":(exclude)src/secp256k1/" ":(exclude)src/minisketch/" ":(exclude)src/univalue/" ":(exclude)contrib/builder-keys/keys.txt" ":(exclude)contrib/guix/patches") if ! codespell --check-filenames --disable-colors --quiet-level=7 --ignore-words=${IGNORE_WORDS_FILE} "${FILES[@]}"; then echo "^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in ${IGNORE_WORDS_FILE}" diff --git a/test/lint/lint-format-strings.py b/test/lint/run-lint-format-strings.py similarity index 100% rename from test/lint/lint-format-strings.py rename to test/lint/run-lint-format-strings.py diff --git a/test/lint/lint-spelling.ignore-words.txt b/test/lint/spelling.ignore-words.txt similarity index 100% rename from test/lint/lint-spelling.ignore-words.txt rename to test/lint/spelling.ignore-words.txt