Skip to content

Commit 683a3fe

Browse files
committed
BUG/MINOR: disallow whitespace-malformatted subjects
1 parent 449a841 commit 683a3fe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

check-commit/check.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func checkSubjectText(subject string) error {
8383
subjectPartsLen := len(subjectParts)
8484

8585
if subject != strings.Join(subjectParts, " ") {
86-
log.Printf("malformatted subject string (trailing or double spaces?): '%s'\n", subject)
86+
return fmt.Errorf("malformatted subject string (trailing or double spaces?): '%s' (%w)", subject, ErrSubjectMessageFormat)
8787
}
8888

8989
if subjectPartsLen < minSubjectParts || subjectPartsLen > maxSubjectParts {

0 commit comments

Comments
 (0)