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 installed PHP_CodeSniffer 3.23 and created a simple file.
<?php$x = 1?>
If you name the file foo.php, and run phpcbf -q --stdin-path=foo.php - < foo.php, then phpcbf returns the contents of the file. If you rename the file to .foo.php and run phpcbf -q --stdin-path=.foo.php - < .foo.php, then phpcbf returns the following.
No fixable errors were found
Time: 25ms; Memory: 4Mb
ALE wants to be able to pipe the buffer data into the program and read the fixed results from stdout, so this causes some issues where buffers are replaced with the above output.
The text was updated successfully, but these errors were encountered:
Note that this isn't an issue with PHPCBF. PHPCS itself will not check a hidden file, so it doesn't produce any error messages for PHPCBF to fix. The same thing would happen if you didn't specify an extension on the stdin-path.
Having PHPCS start checking hidden files, and/or those without an extension would be a fairly big change.
gsherwood
changed the title
phpcbf --stdin-path is broken when the filename starts with a dot
PHPCS doesn't check files that begin with a dot
Mar 12, 2018
Closing as I've had not further interest in making a core change like this, and it couldn't be made until a major release anyway. If more interest comes up, I'll revisit for version 4.
This bug was originally raised in ALE here: dense-analysis/ale#1408
I installed PHP_CodeSniffer 3.23 and created a simple file.
If you name the file
foo.php
, and runphpcbf -q --stdin-path=foo.php - < foo.php
, thenphpcbf
returns the contents of the file. If you rename the file to.foo.php
and runphpcbf -q --stdin-path=.foo.php - < .foo.php
, thenphpcbf
returns the following.ALE wants to be able to pipe the buffer data into the program and read the fixed results from stdout, so this causes some issues where buffers are replaced with the above output.
The text was updated successfully, but these errors were encountered: