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

phpcs document formatter throws missing file Error #94

Open
1 of 6 tasks
ethanteague opened this issue Jun 18, 2022 · 1 comment
Open
1 of 6 tasks

phpcs document formatter throws missing file Error #94

ethanteague opened this issue Jun 18, 2022 · 1 comment

Comments

@ethanteague
Copy link

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

  • Go to web/modules/contrib/admin_toolbar/admin_toolbar_tools/admin_toolbar_tools.module
  • Choose Format document option after right click
  • Observe missing file error

Expected behavior

Document is formatted per Drupal sniff standards

Screenshots

image

Version and configuration information (please complete the following information)

  • Issue page Applies to all issues I tested
  • Issue branch Applies to all issues I tested
  • Drupal core version 9.4
  • Project type
  • Core
  • Module
  • Theme
@shaal
Copy link
Owner

shaal commented Jun 18, 2022

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 :)

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