Skip to content

Commit

Permalink
tools/verifygitlog.py: Ignore line length in body if it's a URL.
Browse files Browse the repository at this point in the history
This changes the git commit message line length check to ignore lines that
contain URLs, since these cannot be wrapped without breaking tools that
detect URLs and create a link.

Signed-off-by: David Lechner <david@pybricks.com>
  • Loading branch information
dlech authored and dpgeorge committed Feb 18, 2022
1 parent 28cb573 commit 5d6408f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/verifygitlog.py
Expand Up @@ -69,7 +69,8 @@ def warning(err):

# Message body lines.
for line in raw_body[2:]:
if len(line) >= 76:
# Long lines with URLs are exempt from the line length rule.
if len(line) >= 76 and "://" not in line:
error("Message lines should be 75 or less characters: " + line)

if not raw_body[-1].startswith("Signed-off-by: ") or "@" not in raw_body[-1]:
Expand Down

0 comments on commit 5d6408f

Please sign in to comment.