mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-04 04:02:23 +02:00
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>
This commit is contained in:
parent
b4f686952a
commit
75848ec2da
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user