gitlint: do not allow treewide as an area in commit messages

Treewide changes touching a single area or topic should have the
area/subsystem at the start of the commit message. Treewide is very
ambigous.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2024-04-04 09:03:31 -04:00 committed by Alberto Escolar
commit 66af7a6881
3 changed files with 3 additions and 2 deletions

View file

@ -95,7 +95,7 @@ class TitleStartsWithSubsystem(LineRule):
def validate(self, title, _commit):
regex = self.options['regex'].value
pattern = re.compile(regex, re.UNICODE)
violation_message = "Commit title does not follow [subsystem]: [subject] (and should not start with literal subsys:)"
violation_message = "Commit title does not follow [subsystem]: [subject] (and should not start with literal subsys or treewide)"
if not pattern.search(title):
return [RuleViolation(self.id, violation_message, title)]