grumphp
grumphp copied to clipboard
PhpMd cannot exclude directories
| Q | A |
|---|---|
| Version | GrumPHP 1.3.2 |
| Bug? | yes |
| New feature? | no |
| Question? | no |
| Documentation? | yes |
| Related tickets | comma-separated list of related tickets |
My configuration
# grumphp.yml
# Please add a copy of your grumphp.yml file.
grumphp:
hide_circumvention_tip: true
process_timeout: 300
stop_on_failure: false
ignore_unstaged_changes: false
tasks:
phpmd:
ruleset: ['./dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml']
triggered_by: ['php']
exclude:
- "./app/code/Magento/"
- "./app/code/*/*/Setup/"
- "./legacy/*/*/src/*/*"
- "./legacy/*/*/*"
metadata:
priority: 70
# uncomment to skip modules using whitelist patterns
whitelist_patterns:
- /^legacy\/.*/
Steps to reproduce:
# Generate empty folder
mkdir -p legacy/{vendor-a,vendor-b}
mkdir -p legacy/vendor-a/src/module-a
mkdir -p legacy/vendor-b/module-a
composer require --dev phpro/grumphp
# Your actions
# Please add the steps on how to reproduce the issue here.
# Run GrumPHP:
./vendor/bin/grumphp run
Result:
# Please add the result of the run or git commit actions here.
GrumPHP still pickup PHP files inside legacy dir
It is most likely related to the mix of adding the files to the CLI command and specifying exclude patterns. Can you check how this works in phpmd?
Closing this one because of inactivity If the issue still persists - feel free to reopen and provide some additional context.