Change in osmo-ci[master]: scripts/verify_log_statements.py: strip OSMO_STRINGIFY()

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 18:13:58 UTC 2018


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


Change subject: scripts/verify_log_statements.py: strip OSMO_STRINGIFY()
......................................................................

scripts/verify_log_statements.py: strip OSMO_STRINGIFY()

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



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

diff --git a/scripts/verify_log_statements.py b/scripts/verify_log_statements.py
index 6108c23..567a96a 100755
--- a/scripts/verify_log_statements.py
+++ b/scripts/verify_log_statements.py
@@ -21,6 +21,7 @@
 log_statement_re = re.compile(r'^[ \t]*LOG[_A-Z]+\(([^";,]*,)*[ \t\r\n]*(("[^"]*"[^";,]*)*)(,[^;]*|)\);',
                               re.MULTILINE | re.DOTALL)
 fmt_re = re.compile(r'("[^"]*".*)*fmt')
+osmo_stringify_re = re.compile("OSMO_STRINGIFY[_A-Z]*\([^)]*\)")
 
 debug = ('-d' in sys.argv) or ('--debug' in sys.argv)
 
@@ -79,6 +80,7 @@
     for n in (16,32,64):
       quoted = quoted.replace('PRIu' + str(n), '')
       quoted = quoted.replace('PRId' + str(n), '')
+    quoted = ''.join(osmo_stringify_re.split(quoted))
 
     # Use py eval to join separate string constants: drop any tabs/newlines
     # that are not in quotes, between separate string constants.

-- 
To view, visit https://gerrit.osmocom.org/10064
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: I439ee65cd65cf42e1005ca71aa7d4b680b18c0e5
Gerrit-Change-Number: 10064
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/c2639746/attachment.htm>


More information about the gerrit-log mailing list