Skip to content

Commit 75848ec

Browse files
jonatacklaanwj
andcommitted
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 <[email protected]>
1 parent b4f6869 commit 75848ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/lint/lint-logs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616

1717

1818
def main():
19-
logs_list = check_output(["git", "grep", "--extended-regexp", r"LogPrintf?\(", "--", "*.cpp"], universal_newlines=True, encoding="utf8").splitlines()
19+
logs_list = check_output(["git", "grep", "--extended-regexp", r"(LogPrintLevel|LogPrintf?)\(", "--", "*.cpp"], universal_newlines=True, encoding="utf8").splitlines()
2020

2121
unterminated_logs = [line for line in logs_list if not re.search(r'(\\n"|/\* Continued \*/)', line)]
2222

2323
if unterminated_logs != []:
24-
print("All calls to LogPrintf() and LogPrint() should be terminated with \\n")
24+
print("All calls to LogPrintf(), LogPrint(), LogPrintLevel(), and WalletLogPrintf() should be terminated with \"\\n\".")
2525
print("")
2626

2727
for line in unterminated_logs:

0 commit comments

Comments
 (0)