diff options
author | Damien George <damien@micropython.org> | 2023-05-03 14:42:18 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2023-05-08 12:20:56 +1000 |
commit | 7c645b52e315fa3d63bb95bb42ccf2a9c15fe21d (patch) | |
tree | 8c1eea5f03b876964f5c8f3e36caf66e6ab59bc2 /tools/verifygitlog.py | |
parent | a31e3de400c5b35f954222fa924d361d5c93ff95 (diff) |
CODECONVENTIONS: Require that commits be signed-off by the author.
And use "must" instead of "should" where appropriate in related text.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tools/verifygitlog.py')
-rwxr-xr-x | tools/verifygitlog.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/verifygitlog.py b/tools/verifygitlog.py index ee3e119f3..ad9385e7a 100755 --- a/tools/verifygitlog.py +++ b/tools/verifygitlog.py @@ -49,17 +49,17 @@ def git_log(pretty_format, *args): def diagnose_subject_line(subject_line, subject_line_format, err): err.error("Subject line: " + subject_line) if not subject_line.endswith("."): - err.error('* should end with "."') + err.error('* must end with "."') if not re.match(r"^[^!]+: ", subject_line): - err.error('* should start with "path: "') + err.error('* must start with "path: "') if re.match(r"^[^!]+: *$", subject_line): - err.error("* should contain a subject after the path.") + err.error("* must contain a subject after the path.") m = re.match(r"^[^!]+: ([a-z][^ ]*)", subject_line) if m: - err.error('* first word of subject ("{}") should be capitalised.'.format(m.group(1))) + err.error('* first word of subject ("{}") must be capitalised.'.format(m.group(1))) if re.match(r"^[^!]+: [^ ]+$", subject_line): - err.error("* subject should contain more than one word.") - err.error("* should match: " + repr(subject_line_format)) + err.error("* subject must contain more than one word.") + err.error("* must match: " + repr(subject_line_format)) err.error('* Example: "py/runtime: Add support for foo to bar."') @@ -94,11 +94,11 @@ def verify_message_body(raw_body, err): if not re.match(subject_line_format, subject_line): diagnose_subject_line(subject_line, subject_line_format, err) if len(subject_line) >= 73: - err.error("Subject line should be 72 or fewer characters: " + subject_line) + err.error("Subject line must be 72 or fewer characters: " + subject_line) # Second one divides subject and body. if len(raw_body) > 1 and raw_body[1]: - err.error("Second message line should be empty: " + raw_body[1]) + err.error("Second message line must be empty: " + raw_body[1]) # Message body lines. for line in raw_body[2:]: @@ -107,7 +107,7 @@ def verify_message_body(raw_body, err): err.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]: - err.warning('Message should be signed-off. Use "git commit -s".') + err.error('Message must be signed-off. Use "git commit -s".') def run(args): |