diff --git a/.gitlint b/.gitlint index 687a0effd05..561a8a29bac 100644 --- a/.gitlint +++ b/.gitlint @@ -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 diff --git a/scripts/gitlint/zephyr_commit_rules.py b/scripts/gitlint/zephyr_commit_rules.py index bf0a8e75734..fc7309be0b1 100644 --- a/scripts/gitlint/zephyr_commit_rules.py +++ b/scripts/gitlint/zephyr_commit_rules.py @@ -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)]