tools/verifygitlog.py: Ignore line length in body if it's a URL.

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>
pull/8311/head
David Lechner 2022-02-09 11:02:12 -06:00 zatwierdzone przez Damien George
rodzic 28cb573b89
commit 5d6408f8f9
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -69,7 +69,8 @@ def verify(sha):
# 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]: