phpro / grumphp

A PHP code-quality tool
MIT License
4.13k stars 430 forks source link

git_branch_name fails if any whitelist rules don't pass #866

Closed qooplmao closed 3 years ago

qooplmao commented 3 years ago
Q A
Version vendor/bin/grumphp -V
Bug? no
New feature? no
Question? yes
Documentation? no
Related tickets PR #867

git_branch_name fails if any of the items in the list fail.

My understanding that a whitelist is an explicit allow list so anything in the list that passes, providing it's not also in the black, should be an instant pass. With the following configuration I would expect a branch called feature/new-feature to pass but, at the moment, it would fail as it doesn't also fit fix/* .

I know that I could create a single line regex but it seems to defeat the purpose of having a "list".

# grumphp.yml
grumphp:
    tasks:
        git_branch_name:
            whitelist:
                - 'feature/*'
                - 'fix/*'
            blacklist:
                - 'develop'
                - 'master'
veewee commented 3 years ago

Thanks for reporting! Lets continue the discussion in #867.