shaal / DrupalPod

Start Drupal contributions with 1 click.
https://shaal.github.io/DrupalPod
MIT License
163 stars 54 forks source link

phpcs document formatter throws missing file Error #94

Open ethanteague opened 2 years ago

ethanteague commented 2 years ago

Describe the bug

Running the Format document command with default wongjn Php sniffer extension in any php file throws ERROR: The specified bootstrap file "/workspace/.vscode-remote/extensions/wongjn.php-sniffer-1.3.0/lib/files.php" does not exist

To Reproduce

Expected behavior

Document is formatted per Drupal sniff standards

Screenshots

image

Version and configuration information (please complete the following information)

shaal commented 2 years ago

Thank you for reporting this. The main cause for this issue is that phpcs and phpcbf (and php) are all running inside ddev container. VSCode is not aware of that, and /workspace/.vscode-remote is a directory on the host, that doesn't exist in the container.

I'm not sure yet what's the best way to solve it. Ideas welcome :)