Visual Studio Code: Unable to locate phpcs

后端 未结 15 1934
梦毁少年i
梦毁少年i 2021-02-01 01:56

I am facing this issue in Visual Studio Code. I have already tried reinstalling the phpcs extension but still facing this issue.

Unable to locat

15条回答
  •  被撕碎了的回忆
    2021-02-01 02:19

    My solution without the need to install php_codesniffer globally.

    Just go to VSCode settings and define the local path ./vendor/squizlabs/php_codesniffer/bin/phpcs

    Or you can set the path directly in your settings.json

    "phpcs.executablePath": "./vendor/squizlabs/php_codesniffer/bin/phpcs"
    

提交回复
热议问题