ci/lint: allow the first word after : to be an option with --

This commit is contained in:
Guido Cella 2024-05-20 16:55:51 +02:00 committed by Kacper Michajłow
parent 68a5490be2
commit 7c4e7d8c7b
1 changed files with 3 additions and 6 deletions

View File

@ -74,12 +74,9 @@ def subsystem_prefix(body):
@lint_rule("First word after : must be lower case") @lint_rule("First word after : must be lower case")
def description_lowercase(body): def description_lowercase(body):
if re.search(NO_PREFIX_WHITELIST, body[0]): # Allow all caps for acronyms and options with --
return True return (re.search(NO_PREFIX_WHITELIST, body[0]) or
# Allow all caps for acronyms and such re.search(r": (?:[A-Z]{2,} |--[a-z]|[a-z0-9])", body[0]))
if re.search(r": [A-Z]{2,} ", body[0]):
return True
return re.search(r": [a-z0-9]", body[0])
@lint_rule("Subject line must not end with a full stop") @lint_rule("Subject line must not end with a full stop")
def no_dot(body): def no_dot(body):