Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/10062


Change subject: scripts/verify_log_statements.py: fix regex
......................................................................

scripts/verify_log_statements.py: fix regex

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

Change-Id: If61a36a014a799b94030e5e08a50dfef4207a8a2
---
M scripts/verify_log_statements.py
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/62/10062/1

diff --git a/scripts/verify_log_statements.py b/scripts/verify_log_statements.py
index e7752e1..48f406b 100755
--- a/scripts/verify_log_statements.py
+++ b/scripts/verify_log_statements.py
@@ -18,8 +18,8 @@
 # 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

--
To view, visit https://gerrit.osmocom.org/10062
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If61a36a014a799b94030e5e08a50dfef4207a8a2
Gerrit-Change-Number: 10062
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <[email protected]>

Reply via email to