Fix imperative mood false positives#7
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because:
commit subject is in imperative mood, but contains a word on the
blacklist, e.g. "Remove the temporary fixes to foo"
the blacklist words anywhere in the string.
This change:
subject against the blacklist.
Notes:
false positives are coming up relatively frequently.
Fixes #6