Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add failOnMatch option #93

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

happycollision
Copy link

@happycollision happycollision commented Feb 1, 2023

This option, when "true" will fail the checker when the given pattern matches the commit message. This allows for a simpler kind check for negative conditions such as "The commit message does not start with 'fixup'."

I rewrote some test cases here so that they were grouped into input types. This allowed me to use the same inputs for both the default settings and also the failOnMatch setting. Each of the "default" tests are exactly the same as they were before, with the "via failOnMatch" tests being the tests that were actually added.

Resolves #92

This option, when `"true"` will fail the checker when the given pattern
matches the commit message. This allows for a simpler kind check for
negative conditions such as "The commit message does not start with
'fixup'."

I rewrote some test cases here so that they were grouped into input
types. This allowed me to use the same inputs for both the default
settings and also the `failOnMatch` setting. Each of the "default" tests
are exactly the same as they were before, with the "via `failOnMatch`"
tests being the tests that were actually added.
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.

Add an option to invert the check (fail if RegExp succeeds)
1 participant