pw_presubmit: Skip lines with > in commit message check
Reverts made in Gerrit quote the original commit message with ">". Don't
check line length of lines ">" in them.
Change-Id: I349939e54d12abad80f4f61e9403aef29326c1db
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/30603
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Michael Spang <spang@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
index 7b593b2..39d1b32 100755
--- a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
+++ b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
@@ -482,7 +482,7 @@
# might possibly have a URL, path, or metadata in them. Also skip any lines
# with non-ASCII characters.
for i, line in enumerate(lines[2:], 3):
- if ':' in line or '/' in line or not line.isascii():
+ if any(c in line for c in ':/>') or not line.isascii():
continue
if len(line) > 72: