Change in osmo-ci[master]: scripts/verify_log_statements.py: fix regex

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Jul 19 17:48:41 UTC 2018


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 <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180719/699a53ba/attachment.htm>


More information about the gerrit-log mailing list