Commit Graph

6 Commits

Author SHA1 Message Date
Harald Welte 8d0605c4fb verify_*.py: Ignore UTF-8 decoding errors
Some of our source files are inherited from other sources, particularly
for microcontroller firmware projects.  We cannot assume they're all
clean UTF-8.  Let's ignore any decoder errors when verifying log
statements and value_string arrays.

Closes: OS#4334
Change-Id: I1e19f4bc6bee46481c6ea743e8334bd4485909be
2019-12-17 13:19:12 +01:00
Neels Hofmeyr e83f8a4737 scripts/verify_log_statements.py: on parse error, print file
If string eval encounters an uncovered parse error, it's useful to know which
file it happened in.

Change-Id: I5fe9a3bbdbfb8a995f24596bf09e70ca5bb3fe8a
2018-07-19 20:13:09 +02:00
Neels Hofmeyr 6475204b4c scripts/verify_log_statements.py: strip OSMO_STRINGIFY()
Change-Id: I439ee65cd65cf42e1005ca71aa7d4b680b18c0e5
2018-07-19 20:11:51 +02:00
Neels Hofmeyr 7ae9791c59 scripts/verify_log_statements.py: figure out line numbers
Change-Id: Ib75c8f5a99ed556d85896b7f8c65fb9446a2fbce
2018-07-19 19:48:26 +02:00
Neels Hofmeyr 16515ddc78 scripts/verify_log_statements.py: fix regex
Would miss those where the fmt string starts on a new line.

Change-Id: If61a36a014a799b94030e5e08a50dfef4207a8a2
2018-07-19 19:47:07 +02:00
Neels Hofmeyr 7eec2dab31 add scripts/verify_log_statements.py
This came up in
https://gerrit.osmocom.org/#/c/osmo-bsc/+/9671/6//COMMIT_MSG@36

The errors it finds in the current code base are numerous, and many are
intended LOGP .. LOGPC calls. It doesn't make sense to enforce this, but so far
this can be used manually.

Change-Id: Id79389f090a2fded7ff01dc7e3fe9774e7f22ca0
2018-07-16 19:53:29 +02:00