Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--stdin-path option is not working: ERROR: You must supply at least one file or directory to process. #177

Open
pelayog opened this issue May 25, 2020 · 1 comment

Comments

@pelayog
Copy link

pelayog commented May 25, 2020

Using the plugin in VS, a notification appears with the following content:

phpcs: Unknown error ocurred. Please verify that C:\Users\xx\AppData\Roaming\Composer\vendor\bin\phpcs.bat --report=json -q --encoding=UTF-8 --error-severity=5 --warning-severity=5 --stdin-path=c:\path\to\file.php - returns a valid json object.

When executing this command in PowerShell, the output is the following:
ERROR: You must supply at least one file or directory to process.

However, removing the --stdin option and passing the path as an argument, gives a correct output in JSON.

phpcs.bat --report=json -q --encoding=UTF-8 --error-severity=5 --warning-severity=5 c:\path\to\file.php

{"totals":{"errors":...

Any idea on how to fix it?

Thanks!

@joggerjoel
Copy link

PHP_CodeSniffer version 3.5.4 does not have --stdin-path

You need to clone the develop branch and alter code as stated below:

#119 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants