diff --git a/.arclint b/.arclint --- a/.arclint +++ b/.arclint @@ -15,6 +15,15 @@ "autopep8": { "type": "autopep8", "include": "(\\.py$)" + }, + "lint-format-strings": { + "type": "script-and-regex", + "include": "(^src/.*\\.(h|c|cpp)$)", + "exclude": [ + "(^src/(secp256k1|univalue|leveldb)/)" + ], + "script-and-regex.script": "test/lint/lint-format-strings.sh", + "script-and-regex.regex": "/^(?P.+): (?P.+:.+)$/m" } } } diff --git a/test/lint/lint-format-strings.sh b/test/lint/lint-format-strings.sh --- a/test/lint/lint-format-strings.sh +++ b/test/lint/lint-format-strings.sh @@ -32,10 +32,8 @@ fi for S in "${FUNCTION_NAMES_AND_NUMBER_OF_LEADING_ARGUMENTS[@]}"; do IFS="," read -r FUNCTION_NAME SKIP_ARGUMENTS <<< "${S}" - mapfile -t MATCHING_FILES < <(git grep --full-name -l "${FUNCTION_NAME}" -- "*.c" "*.cpp" "*.h" | sort | grep -vE "^src/(leveldb|secp256k1|tinyformat|univalue)") - if ! test/lint/lint-format-strings.py --skip-arguments "${SKIP_ARGUMENTS}" "${FUNCTION_NAME}" "${MATCHING_FILES[@]}"; then - EXIT_CODE=1 - fi + mapfile -t MATCHING_FILES < <(git grep --full-name -l "${FUNCTION_NAME}" -- ${1}) + test/lint/lint-format-strings.py --skip-arguments "${SKIP_ARGUMENTS}" "${FUNCTION_NAME}" "${MATCHING_FILES[@]}" done exit ${EXIT_CODE} \ No newline at end of file