PHPCS offers the - flag on the end of the command which makes it explicit, that we are going to read from STDIN instead of local files and directories.
While omitting the - might often work, it does not seem to work with empty files as the cat empty.file | phpcs --report=json reads all local files and directories.
PHPCS offers the
-
flag on the end of the command which makes it explicit, that we are going to read from STDIN instead of local files and directories.While omitting the
-
might often work, it does not seem to work with empty files as thecat empty.file | phpcs --report=json
reads all local files and directories.Adding
-
flag fixes the issue.Fixes #9