Open jroru opened 6 years ago
I confirm the same problem:
When I use a workspace and it calls a network directory, it does not work.
C:\php\bin\phpcs.bat --report=json -q --encoding=UTF-8 --standard=PSR2 --error-severity=5 --warning -severity=0 --stdin-path=//192.168.1.16/demo/info.php ERROR: You must supply at least one file or directory to process.
C:\php\bin\phpcs.bat --report=json -q --encoding=UTF-8 --standard=PSR2 --error-severity=5 --warning -severity=0 \192.168.1.16\demo\info.php {"totals":{"errors":3,"warnings":0,"fixable":3},.....
Exactly the same problem.
Any solutions?
I recommend mapping the network location as a network drive.
Assuming you want the new drive to be "Z:" and the network files are available at "\\wsl$\Ubuntu\your\path\to\the\files"...
CMD
net use z: \\wsl$\Ubuntu
Then you can access the files via the newly added drive.
If you need to add user/password etc. for access, see the net use /?
documentation.
Open the files in VSCode using the network path, Z:\your\path\to\the\files\
.
I recently switched from connecting to my dev server using network drives to using network locations.
vscode-phpcs automatic sniffing:
phpcs: Unknown error ocurred. Please verify that C:\php\phpcs.bat --report=json -q --encoding=UTF-8 --standard=Drupal --error-severity=5 --warning-severity=5 --stdin-path=\y\update.php - returns a valid json object.
Even running these commands manually phpcs does not locate the file:
C:\php\phpcs.bat --report=json -q --encoding=UTF-8 --standard=Drupal --error-severity=5 --warning-severity=5 --stdin-path=update.php -
C:\php\phpcs.bat --report=json -q --encoding=UTF-8 --standard=Drupal --error-severity=5 --warning-severity=5 --stdin-path=\update.php -
The only way I can get phpcs to sniff my file is by removing --stdin-path and instead running this;
C:\php\phpcs.bat --report=json -q --encoding=UTF-8 --standard=Drupal --error-severity=5 --warning-severity=5 update.php