In my testing, I've run into an issue with an empty file, as the cat empty.file | phpcs --report=json seems to be instructing the phpcs to read all local files and directories. By using the - flag, described in help as
- Check STDIN instead of local files and directories
seems to fix the issue.
The issue can be reproduced even with phpcs itself:
In my testing, I've run into an issue with an empty file, as the
cat empty.file | phpcs --report=json
seems to be instructing the phpcs to read all local files and directories. By using the-
flag, described in help asseems to fix the issue.
The issue can be reproduced even with phpcs itself:
and can be fixed by adding the
-
flag to the end: