CodeSniffer 无法在 PhpStorm/MacOS 上运行,但可以在 Docker 中运行
我在 MacOS (Apple Silicon M1) 上使用 PhpStorm 2021.3。我不确定 PhpStorm 的问题,但 PHP Code Sniffer 不起作用。
当我输入此命令时,它不会在代码中显示任何错误,而且我确信我有一些错误。
vendor/bin/phpcs
控制台中唯一出现的是Time: 38ms;内存:8MB
CodeSniffer 由composer 安装。
另一方面,如果我在 Docker 中输入相同的命令(在 bash 中使用 Laravel Sail),我会在代码中得到错误/警告列表。
回到PhpStorm,我尝试配置IDE以与Docker中的PHPCS配合使用,但仍然不起作用,我不知道该去哪里寻找。
PHP_CodeSniffer version 3.6.2 (stable) by Squiz
如何让 CodeSniffer 工作,无论是通过 PhpStorm 还是在 PhpStorm 和 Docker 中自动化?
I use PhpStorm 2021.3 on MacOS (Apple Sillicon M1). I'm not sure the problem is with PhpStorm but PHP Code Sniffer doesn't work.
When I type this command it doesn't show any errors in the code and I'm sure I got some.
vendor/bin/phpcs
The only thing that appears in the console is Time: 38ms; Memory: 8MB
CodeSniffer is installed by composer.
On the other hand, if I enter this same command in Docker (with Laravel Sail, in bash), I do get a list of errors/warnings in my code.
Going back to PhpStorm, I tried to configure the IDE to work with PHPCS in Docker, but it still doesn't work, and I don't know where to look.
PHP_CodeSniffer version 3.6.2 (stable) by Squiz
How to make CodeSniffer work, either through PhpStorm or automate it in PhpStorm and Docker?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论