From 75848ec2daa43b648cf497c59924d389e8243320 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Wed, 25 May 2022 23:45:28 +0200 Subject: [PATCH] scripts and tools: update lint-logs.py to detect LogPrintLevel() and add WalletLogPrintf() (already detected) to the lint-logs.py suggestion Co-authored-by: laanwj <126646+laanwj@users.noreply.github.com> --- test/lint/lint-logs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/lint/lint-logs.py b/test/lint/lint-logs.py index e6c4c068fb..de53729b4e 100755 --- a/test/lint/lint-logs.py +++ b/test/lint/lint-logs.py @@ -16,12 +16,12 @@ from subprocess import check_output def main(): - logs_list = check_output(["git", "grep", "--extended-regexp", r"LogPrintf?\(", "--", "*.cpp"], universal_newlines=True, encoding="utf8").splitlines() + logs_list = check_output(["git", "grep", "--extended-regexp", r"(LogPrintLevel|LogPrintf?)\(", "--", "*.cpp"], universal_newlines=True, encoding="utf8").splitlines() unterminated_logs = [line for line in logs_list if not re.search(r'(\\n"|/\* Continued \*/)', line)] if unterminated_logs != []: - print("All calls to LogPrintf() and LogPrint() should be terminated with \\n") + print("All calls to LogPrintf(), LogPrint(), LogPrintLevel(), and WalletLogPrintf() should be terminated with \"\\n\".") print("") for line in unterminated_logs: