sirbrillig / phpcs-changed

🐘 Run phpcs on files and only report new warnings/errors compared to the previous version.
MIT License
31 stars 11 forks source link

Use the `-` flag for checking STDIN #10

Closed david-binda closed 5 years ago

david-binda commented 5 years ago

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.

Adding - flag fixes the issue.

Fixes #9