Closed jigarius closed 1 year ago
Hello,
It should pass if one of the lines matches according to the implementation and testsuite. Can you provide a failing unit test? https://github.com/phpro/grumphp/blob/master/test/Unit/Task/Git/BranchNameTest.php#L96-L105
Thanks for the suggestion as well. It's on the radar - yet a lot of work with a lot of breaking changes for everyone. So it will probably be something for v2 - if I ever find the time :)
The issue is that in the regex rules, you need to double escape your forward slash (\/) so that what is passed to preg_match() is a single escaped string (\/)
I'll close it for now because I think the fix suggested in the previous comment makes sense. I'll reopen it if doesn't work.
My configuration
Steps to reproduce:
Result:
The first pattern in the
whitelist
matches, but grumphp still fails because the other 2 don't match. Am I doing something wrong? Also, in the long term, I'd suggest renamingwhitelist
andblacklist
toallow
anddeny
.