Skip to content

Commit

Permalink
commitlint/plugins: fix the rule
Browse files Browse the repository at this point in the history
If the subject contains just the word "fix", and there's no
commit msg body, this rule should complain.
  • Loading branch information
tehraninasab committed Mar 26, 2023
1 parent fad92e1 commit dc8d7a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions commitlint/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ export abstract class Plugins {

if (firstWordInTitle === "update") {
offence = titleWords.length > 1 && bodyStr === null;
} else if (firstWordInTitle === "fix") {
offence = bodyStr === null;
} else {
offence = obviousWords.includes(firstWordInTitle);
}
Expand Down

0 comments on commit dc8d7a2

Please sign in to comment.