Skip to content

Commit

Permalink
gitlint: do not start with subsys:
Browse files Browse the repository at this point in the history
Commit messages should not start with literal "subsys:", instead, spell
out the actual subsystem name.

Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif authored and andrewboie committed Nov 28, 2018
1 parent 547e757 commit 8d84f92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitlint
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ min-line-count=1
max-line-count=200

[title-starts-with-subsystem]
regex = ^(([^:]+):)(\s([^:]+):)*\s(.+)$
regex = ^(?!subsys:)(([^:]+):)(\s([^:]+):)*\s(.+)$

[title-must-not-contain-word]
# Comma-separated list of words that should not occur in the title. Matching is case
Expand Down
2 changes: 1 addition & 1 deletion scripts/gitlint/zephyr_commit_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class TitleStartsWithSubsystem(LineRule):
def validate(self, title, _commit):
regex = self.options['regex'].value
pattern = re.compile(regex, re.UNICODE)
violation_message = "Title does not follow [subsystem]: [subject]"
violation_message = "Title does not follow [subsystem]: [subject] (and should not start with literal subsys:)"
if not pattern.search(title):
return [RuleViolation(self.id, violation_message, title)]

Expand Down

0 comments on commit 8d84f92

Please sign in to comment.