You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm hitting the issue when passing an output of the svn can command to the PHPCS using pipes. When using the cat for outputting the file and piping it to PHPCS, everything seems to be working fine. This is, imho, related to the fact the initial stream reading is not blocking (which can't be changed to blocking).
Looks like saving the value to CLI values before it's passed to $phpcs->processFile() method might resolve the issue.
The text was updated successfully, but these errors were encountered:
david-binda
added a commit
to david-binda/PHP_CodeSniffer
that referenced
this issue
Feb 7, 2017
In case the PHP Code Sniffer's CLI falls back to re-reading the STDIN in https://github.com/squizlabs/PHP_CodeSniffer/blob/ee3ce4b8ab6b5c815a06fea52ab480a69343134e/CodeSniffer/CLI.php#L1002,L1007 the value is not saved to the CLI values as
stdin
and thus the$fileContents
is not reachable from within the Sniffs as if it would be in case the initial reading succeeded: https://github.com/squizlabs/PHP_CodeSniffer/blob/ee3ce4b8ab6b5c815a06fea52ab480a69343134e/CodeSniffer/CLI.php#L405,L418I'm hitting the issue when passing an output of the
svn can
command to the PHPCS using pipes. When using thecat
for outputting the file and piping it to PHPCS, everything seems to be working fine. This is, imho, related to the fact the initial stream reading is not blocking (which can't be changed to blocking).Looks like saving the value to CLI values before it's passed to
$phpcs->processFile()
method might resolve the issue.The text was updated successfully, but these errors were encountered: