From 34aa9051e3c001fc30f5d7614f9c4e34354678d8 Mon Sep 17 00:00:00 2001 From: Zetok Zalbavar Date: Sun, 31 Jul 2016 17:05:58 +0100 Subject: [PATCH] chore: limit scope of commit messages to dozen characters --- CONTRIBUTING.md | 3 +++ verify-commit-messages.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 60da39968..5bacca712 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -105,6 +105,9 @@ The scope could be anything specifying place of the commit change. For example `$location`, `$browser`, `$compile`, `$rootScope`, `ngHref`, `ngClick`, `ngView`, etc. +Since people were abusing length of the scope, it's limited to 12 characters. +If you're running into the limit, you're doing it wrong. + #### Subject The subject contains succinct description of the change: diff --git a/verify-commit-messages.sh b/verify-commit-messages.sh index b57c43f2b..630faa216 100755 --- a/verify-commit-messages.sh +++ b/verify-commit-messages.sh @@ -31,7 +31,7 @@ echo "" # ← formatting # Conform, /OR ELSE/. if git log --format=format:'%s' "$ARG" | \ - grep -v -E '^((feat|fix|docs|style|refactor|perf|revert|test|chore)(\(.+\))?:.{1,68})|(Merge pull request #[[:digit:]]{1,10})$' + grep -v -E '^((feat|fix|docs|style|refactor|perf|revert|test|chore)(\(.{,12}\))?:.{1,68})|(Merge pull request #[[:digit:]]{1,10})$' then echo "" echo "Above ↑ commits don't conform to commit message format:"