Skip to content

Commit ae01850

Browse files
committed
fix: subject-rule-stop rule bugfix
Fixes #3530
1 parent dfc5db4 commit ae01850

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

@commitlint/rules/src/subject-full-stop.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ export const subjectFullStop: SyncRule<string> = (
66
when = 'always',
77
value = '.'
88
) => {
9-
const input = parsed.subject;
109

11-
if (!input) {
10+
let colonIndex = parsed.header.indexOf(':');
11+
if (colonIndex > 0 && colonIndex === parsed.header.length - 1) {
1212
return [true];
1313
}
1414

15+
const input = parsed.header;
16+
1517
const negated = when === 'never';
1618
const hasStop = input[input.length - 1] === value;
1719

0 commit comments

Comments
 (0)