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

Add an option to invert the check (fail if RegExp succeeds) #92

Open
2 of 3 tasks
happycollision opened this issue Jan 31, 2023 · 1 comment · May be fixed by #93
Open
2 of 3 tasks

Add an option to invert the check (fail if RegExp succeeds) #92

happycollision opened this issue Jan 31, 2023 · 1 comment · May be fixed by #93
Assignees
Labels
enhancement New feature or request

Comments

@happycollision
Copy link

happycollision commented Jan 31, 2023

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Are you willing to sponsor your idea?

  • Yes, I like to sponsor this request

Is your feature request related to a problem? Please describe

I am trying to fail if a commit message starts with fixup or squash. I am also trying to fail if a message contains [no-merge]. It is far easier to check for the existence of these things than confirm the negative.

Describe the solution you'd like

A new flag: failOnMatch. It defaults to false (current behavior). Setting to true will fail if the pattern matches on a commit.

Describe alternatives you've considered

RegExp negative lookahead. Ugh. Not easy to understand for the next person to look at the code. (AKA me, in five minutes.)

Additional context

No response

@happycollision happycollision added the enhancement New feature or request label Jan 31, 2023
@happycollision
Copy link
Author

I’ll take a crack at this tonight if I have some spare time. If I didn’t, then someone else should feel free to grab this if it is a desired feature.

@happycollision happycollision linked a pull request Feb 1, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants