Skip to content

Commit

Permalink
style: add check in commit message validation script for
Browse files Browse the repository at this point in the history
non-lowercase first letter in commit message description.

Currently, we do not validate if the first letter in the commit message
description is lowercase.
  • Loading branch information
theo-o committed May 14, 2020
1 parent 6161a58 commit 7b94541
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/validate-commit-messages.py
Expand Up @@ -49,6 +49,9 @@ def pluralize(value, singular="", plural="s"):
if re.search(r"^(build|chore|ci|docs|feat|fix|perf|refactor|style|test)(\([a-z]+\))?: .*$", lines[0],) is None:
errors.append("First line does not match format")

if re.search(r"[^:]: [a-z].*$", lines[0]) is None:
errors.append("First letter in commit message description is not lowercase.")

if len(lines) > 1 and lines[1]:
errors.append(
"Second line must be empty. Please put a blank line between the subject (first line) and the body/extended description (third line "
Expand Down

0 comments on commit 7b94541

Please sign in to comment.