Skip to content

Commit d01053c

Browse files
committed
Merge pull request #4049 from Joshua-Anderson/commit-message-test
fix(commit-msg): ignore comments in line count
2 parents 322fa7e + 9e97208 commit d01053c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

contrib/util/commit-msg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ fi
6767
cnt=${#MESSAGE[@]}
6868
for (( i = 3 ; i <= cnt ; i++ ))
6969
do
70-
if [[ ${#MESSAGE[$i]} -gt 72 ]]; then
70+
if [[ ${#MESSAGE[$i]} -gt 72 ]] && [[ ${MESSAGE[$i]:0:1} != '#' ]]; then
7171
echo "${RED}ERROR on line $i - can't be longer than 72 characters."
7272
echo ""
7373
echo "Read more at http://docs.deis.io/en/latest/contributing/standards/$NORMAL"
7474
exit 1
7575
fi
7676
done
7777

78-
echo "Your commit message follows the deis commit style"
78+
echo "Your commit message follows the deis commit style."
7979

8080
exit 0

0 commit comments

Comments
 (0)