Skip to content

Fix imperative mood false positives#7

Merged
tommarshall merged 2 commits into
masterfrom
6-fix-imperative-mood-false-positives
Nov 22, 2016
Merged

Fix imperative mood false positives#7
tommarshall merged 2 commits into
masterfrom
6-fix-imperative-mood-false-positives

Conversation

@tommarshall

Copy link
Copy Markdown
Owner

Because:

  • The imperative mood check is incorrectly reporting a warning when a
    commit subject is in imperative mood, but contains a word on the
    blacklist, e.g. "Remove the temporary fixes to foo"
  • This is because the check is currently checking for the presence of
    the blacklist words anywhere in the string.

This change:

  • Add test for the false positive case.
  • Fix the issue by having the check test only the first word of the
    subject against the blacklist.

Notes:

  • This may lead to some false negatives, but it's best effort, and the
    false positives are coming up relatively frequently.

Fixes #6

Because:

* The imperative mood check is incorrectly reporting a warning when a
  commit subject is in imperative mood, but contains a word on the
  blacklist, e.g. "Remove the temporary fixes to foo"
* This is because the check is currently checking for the presence of
  the blacklist words anywhere in the string.

This change:

* Add test for the false positive case.
* Fix the issue by having the check test only the first word of the
  subject against the blacklist.

Notes:

* This may lead to some false negatives, but it's best effort, and the
  false positives are coming up relatively frequently.
@tommarshall tommarshall merged commit 117df52 into master Nov 22, 2016
@tommarshall tommarshall deleted the 6-fix-imperative-mood-false-positives branch November 22, 2016 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ignore imperative matches in the rest of the commit message

1 participant