scripts/verify_log_statements.py: fix regex

Would miss those where the fmt string starts on a new line.

Change-Id: If61a36a014a799b94030e5e08a50dfef4207a8a2
This commit is contained in:
Neels Hofmeyr 2018-07-19 19:47:06 +02:00
parent 7eec2dab31
commit 16515ddc78
1 changed files with 2 additions and 2 deletions

View File

@ -18,8 +18,8 @@ import os.path
# This regex matches the entire LOGxx(...) statement over multiple lines.
# It pinpoints the format string by looking for the first arg that contains quotes.
# It then matches any number of separate quoted strings, and accepts 0 or more args after that.
log_statement_re = re.compile(r'^[ \t]*LOG[_A-Z]+\(([^";,]*,)* *(("[^"]*"[^";,]*)*)(,[^;]*|)\);',
re.MULTILINE | re.DOTALL)
log_statement_re = re.compile(r'^[ \t]*LOG[_A-Z]+\(([^";,]*,)*[ \t\r\n]*(("[^"]*"[^";,]*)*)(,[^;]*|)\);',
re.MULTILINE | re.DOTALL)
fmt_re = re.compile(r'("[^"]*".*)*fmt')
errors_found = 0