grumphp icon indicating copy to clipboard operation
grumphp copied to clipboard

phpcs --file-list parameter causes incorrect results

Open MelchiorKokernoot opened this issue 3 years ago • 1 comments

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 -> image

comment:

phpro/grumphp/src/Task/Phpcs.php:87

$arguments->add('--file-list='.$tmpFile);

vendor\bin\grumphp.bat run -> image

Result:

# Please add the result of the run or git commit actions here.

vendor\bin\grumphp.bat run -> image

comment:

phpro/grumphp/src/Task/Phpcs.php:87

$arguments->add('--file-list='.$tmpFile);

vendor\bin\grumphp.bat run -> image

MelchiorKokernoot avatar Feb 15 '22 09:02 MelchiorKokernoot

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?)

veewee avatar Apr 08 '22 18:04 veewee

Closing this one because of inactivity If the issue still persists - feel free to reopen and provide some additional context.

veewee avatar Mar 17 '23 13:03 veewee