Closed phptek closed 6 years ago
Hello @phptek,
There must be something wrong in the configuration. As you can see here, we do check for all patterns: https://github.com/phpro/grumphp/blob/master/src/Task/Git/CommitMessage.php#L136-L142
Since v0.12, we also have some extra options to validate the message length etc. You can probably solve your configuration by using one of the new configuration options. More information can be found here: https://github.com/phpro/grumphp/blob/master/doc/tasks/git_commit_message.md
Hi @phptek , Since this question hasn't had an update for more then a half year, I am closing this issue. Feel free to provide any additional feedback!
I would like to limit the no. chars used in a commit message as well as use sub-patterns to dictate the message format. This cannot be done in PCRE (The interval quantifier can only be used against the preceding pattern). As such, according to the GrumPHP docs, I can use multiple patterns in the YML
matchers
array. The problem is that these would seem to be logicallyOR
'd rather thanAND
'd as I had naively assumed. (See YML file below for use-case).My configuration
Steps to reproduce:
Result:
Using the following commit message which is 73 characters long, Grumphp allows it, but according to rule 2 of
matchers
, this should fail: