diff --git a/commitlint.config.ts b/commitlint.config.ts index 7cd76886e..e404f0cee 100644 --- a/commitlint.config.ts +++ b/commitlint.config.ts @@ -54,7 +54,6 @@ module.exports = { // * Detect reverts which have not been elaborated. // * Reject some stupid obvious words: change, update, modify (if first word after colon, error; otherwise warning). // * Think of how to reject this shitty commit message: https://github.com/nblockchain/NOnion/pull/34/commits/9ffcb373a1147ed1c729e8aca4ffd30467255594 - // * Title should not have dot at the end. // * Workflow: detect if wip commit in a branch not named "wip/*" or whose name contains "squashed". // * Detect if commit hash mention in commit msg actually exists in repo. // * Detect scope(sub-scope) in the title that doesn't include scope part (e.g., writing (bar) instead of foo(bar)) diff --git a/commitlint/integration.test.ts b/commitlint/integration.test.ts index e9e82d9e4..d74750612 100644 --- a/commitlint/integration.test.ts +++ b/commitlint/integration.test.ts @@ -12,3 +12,17 @@ test("body-leading-blank1", () => { let bodyLeadingBlank1 = runCommitLintOnMsg(commitMsgWithoutEmptySecondLine); expect(bodyLeadingBlank1.status).not.toBe(0); }); + +test("subject-full-stop1", () => { + let commitMsgWithEndingDotInTitle = "foo/bar: bla bla blah."; + let subjectFullStop1 = runCommitLintOnMsg(commitMsgWithEndingDotInTitle); + expect(subjectFullStop1.status).not.toBe(0); +}); + +test("subject-full-stop2", () => { + let commitMsgWithoutEndingDotInTitle = "foo/bar: bla bla blah"; + let subjectFullStop2 = runCommitLintOnMsg( + commitMsgWithoutEndingDotInTitle + ); + expect(subjectFullStop2.status).toBe(0); +});