phpcs --file-list parameter causes incorrect results
| Q | A |
|---|---|
| Version | 1.8 |
| Bug? | no |
| New feature? | no |
| Question? | yes |
| Documentation? | no |
When running the Phpcs task with the --file-list parameter GrumPHP finds no errors, when commenting this line at:
phpro/grumphp/src/Task/Phpcs.php:87
$arguments->add('--file-list='.$tmpFile);
The output shows the expected errors:
My configuration
grumphp:
parallel:
enabled: true
max_workers: 32
stop_on_failure: true
hide_circumvention_tip: true
process_timeout: 240
tasks:
phpcs:
standard: "phpcs.xml"
triggered_by: [ "php"]
Steps to reproduce:
vendor\bin\grumphp.bat run ->

comment:
phpro/grumphp/src/Task/Phpcs.php:87
$arguments->add('--file-list='.$tmpFile);
vendor\bin\grumphp.bat run ->

Result:
# Please add the result of the run or git commit actions here.
vendor\bin\grumphp.bat run ->

comment:
phpro/grumphp/src/Task/Phpcs.php:87
$arguments->add('--file-list='.$tmpFile);
vendor\bin\grumphp.bat run ->

Not sure what is going wrong, it could be a couple of things. Can you validate these?
- Are the files known by git when running grumphp?
- Is the --file-list file created and does it contains the valid paths?
- Have you tried running phpcs with the file-list option manually and does that work? (maybe a windows issue?)
Closing this one because of inactivity If the issue still persists - feel free to reopen and provide some additional context.