pw_presubmit: relax commit subject line length
Relaxes the commit subject line length requirement from 50 to
match the body's line length requirement of 72.
Change-Id: I2af5ff693edea22b5893b31327b8117bf8b26074
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/21480
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Ewout van Bekkum <ewout@google.com>
diff --git a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
index 9190cfd..15f7c39 100755
--- a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
+++ b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
@@ -370,7 +370,7 @@
lines = git_repo.commit_message().splitlines()
# Show limits and current commit message in log.
- _LOG.debug('%-25s%+25s%+22s', 'Line limits', '50|', '72|')
+ _LOG.debug('%-25s%+25s%+22s', 'Line limits', '72|', '72|')
for line in lines:
_LOG.debug(line)
@@ -380,9 +380,9 @@
errors = 0
- if len(lines[0]) > 50:
+ if len(lines[0]) > 72:
_LOG.warning("The commit message's first line must be no longer than "
- '50 characters.')
+ '72 characters.')
_LOG.warning('The first line is %d characters:\n %s', len(lines[0]),
lines[0])
errors += 1