diff options
-rwxr-xr-x | tools/validate-commit.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/validate-commit.py b/tools/validate-commit.py index 1c62561aa9..cf4980beb9 100755 --- a/tools/validate-commit.py +++ b/tools/validate-commit.py @@ -21,6 +21,7 @@ import subprocess import sys import tempfile import urllib.request +import re parser = argparse.ArgumentParser() @@ -109,7 +110,8 @@ def extract_subject(subject): def verify_body(body): - old_lines = body.splitlines(True) + bodynocomments = re.sub('^#.*$', '', body, flags=re.MULTILINE) + old_lines = bodynocomments.splitlines(True) is_good = True if len(old_lines) >= 2 and old_lines[1].strip(): print('ERROR: missing blank line after the first subject line.') |