grunt-phpcs icon indicating copy to clipboard operation
grunt-phpcs copied to clipboard

Fatal error: spawn ENAMETOOLONG

Open clphillips opened this issue 11 years ago • 1 comments

I suspect this is something to do with too many files... but isn't an issue for grunt-phplint using the same globbing pattner:

Gruntfile.js

...
    phpcs: {
      all: {
        dir: ['src/**/*.php'],
        options: {
          bin: 'phpcs',
          standard: 'Zend',
          report: 'checkstyle',
          reportFile: 'build/logs/checkstyle.xml'
        }
      }
    },
    phplint: {
      all: ['src/**/*.php']
    },
...

Then run...

grunt phpcs:all

Results in:

Running "phpcs:all" (phpcs) task
Starting phpcs (target: all) in src/**/*.php
Fatal error: spawn ENAMETOOLONG

Like I said, no problem for phplint:

grunt phplint:all

Results in:

Running "phplint:all" (phplint) task
>> 1412 files php linted.
Done, without errors.

clphillips avatar Oct 14 '14 22:10 clphillips

So the issue is quite obviously grunt-phpcs' reliance on globbing. The question is, why require globbing when phpcs can take a list of directories on the command line. This plugin should support that.

clphillips avatar Feb 06 '15 20:02 clphillips