Closed swashata closed 5 years ago
I also realize that ${workspaceFolder}
may not work for vscode settings. So I have set the following, yet no result :(
{
"phpSniffer.executablesFolder": "./vendor/bin/",
"phpSniffer.standard": "./phpcs.xml"
}
Ok, it looks like both the above settings require absolute path. So when I changed
{
"phpSniffer.executablesFolder": "/Volumes/Development/vagrant/www/eform/public_html/wp-content/plugins/wp-fsqm-pro/vendor/bin/",
"phpSniffer.standard": "/Volumes/Development/vagrant/www/eform/public_html/wp-content/plugins/wp-fsqm-pro/phpcs.xml"
}
It started working. Maybe you can consider this a feature request? I will try to add this in a fork and get back to you.
I think passing the workspace folder as the CWD to the command execution might work.
Yes, that should definitely do. If someone is passing in absolute path, then the CWD wouldn't matter anyway.
I'm having the same problem, but my php is running inside a docker container, I have a /usr/bin/php
that looks like this:
#!/bin/bash
docker exec \
-it \
-u $(id -u) \
-w "$PWD" \
php7 \
php "$@"
Are you running the latest version of the extension?
What is the command to run phpcs
with PHP in docker?
Could you provide the settings you are using?
Yes, I'm using the latest version of the extension. I got a script on my composer.json:
"scripts": {
"lint": "phpcs",
"lint:fix": "phpcbf"
}
I just need to run composer lint
to run my phpcs.
Hello,
First of all, thank you very much for this extension. I really appreciate the time and effort you've put behind this. Kudos.
So I am trying to switch over from vscode-phpcs extension. I have phpcs installed as my project dependency. My
composer.json
is something like thisAnd I have a
phpcs.xml
file in the root of my project/repo.Within vscode preference, I have set the following to tell the extension about
phpcs
path.PS: I do have the trailing slash added, but still nothing really happens.
But nothing really happens. I am not sure how the extension is supposed to work. I assumed, it would show lint errors when I open a file? I can confirm
phpcs
itself works because if I runIt works just fine. Am I missing something? Please let me know.