<p>Neels Hofmeyr has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/10062">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">scripts/verify_log_statements.py: fix regex<br><br>Would miss those where the fmt string starts on a new line.<br><br>Change-Id: If61a36a014a799b94030e5e08a50dfef4207a8a2<br>---<br>M scripts/verify_log_statements.py<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/62/10062/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/scripts/verify_log_statements.py b/scripts/verify_log_statements.py</span><br><span>index e7752e1..48f406b 100755</span><br><span>--- a/scripts/verify_log_statements.py</span><br><span>+++ b/scripts/verify_log_statements.py</span><br><span>@@ -18,8 +18,8 @@</span><br><span> # This regex matches the entire LOGxx(...) statement over multiple lines.</span><br><span> # It pinpoints the format string by looking for the first arg that contains quotes.</span><br><span> # It then matches any number of separate quoted strings, and accepts 0 or more args after that.</span><br><span style="color: hsl(0, 100%, 40%);">-log_statement_re = re.compile(r'^[ \t]*LOG[_A-Z]+\(([^";,]*,)* *(("[^"]*"[^";,]*)*)(,[^;]*|)\);',</span><br><span style="color: hsl(0, 100%, 40%);">-                             re.MULTILINE | re.DOTALL)</span><br><span style="color: hsl(120, 100%, 40%);">+log_statement_re = re.compile(r'^[ \t]*LOG[_A-Z]+\(([^";,]*,)*[ \t\r\n]*(("[^"]*"[^";,]*)*)(,[^;]*|)\);',</span><br><span style="color: hsl(120, 100%, 40%);">+                              re.MULTILINE | re.DOTALL)</span><br><span> fmt_re = re.compile(r'("[^"]*".*)*fmt')</span><br><span> </span><br><span> errors_found = 0</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10062">change 10062</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/10062"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ci </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: If61a36a014a799b94030e5e08a50dfef4207a8a2 </div>
<div style="display:none"> Gerrit-Change-Number: 10062 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>