merge bitcoin#25217: update lint-logs.py to detect LogPrintLevel, mention WalletLogPrintf

This commit is contained in:
Kittywhiskers Van Gogh 2024-11-17 12:39:12 +00:00
parent b046e091c9
commit 026409e4ff
No known key found for this signature in database
GPG Key ID: 30CD0C065E5C4AAD

View File

@ -14,7 +14,7 @@
export LC_ALL=C export LC_ALL=C
UNTERMINATED_LOGS=$(git grep --extended-regexp "LogPrintf?\(" -- "*.cpp" | \ UNTERMINATED_LOGS=$(git grep --extended-regexp "(LogPrintLevel|LogPrintf?)\(" -- "*.cpp" | \
grep -v '\\n"' | \ grep -v '\\n"' | \
grep -v '\.\.\.' | \ grep -v '\.\.\.' | \
grep -v "/\* Continued \*/" | \ grep -v "/\* Continued \*/" | \
@ -22,7 +22,7 @@ UNTERMINATED_LOGS=$(git grep --extended-regexp "LogPrintf?\(" -- "*.cpp" | \
grep -v "LogPrintf()") grep -v "LogPrintf()")
if [[ ${UNTERMINATED_LOGS} != "" ]]; then if [[ ${UNTERMINATED_LOGS} != "" ]]; then
# shellcheck disable=SC2028 # shellcheck disable=SC2028
echo "All calls to LogPrintf() and LogPrint() should be terminated with \\n" echo "All calls to LogPrintf(), LogPrint(), LogPrintLevel(), and WalletLogPrintf() should be terminated with \\n"
echo echo
echo "${UNTERMINATED_LOGS}" echo "${UNTERMINATED_LOGS}"
exit 1 exit 1