Closed LC43 closed 5 years ago
@LC43 Thank you for your feedback. Is there a reason why you can't install the missing standard at the required level (system-wide/project-wide). Also now that vscode-phpcs 1.0.0 is out you can configure the phpcs.executablePath at user/workspace/folder settings.
Hello @ikappas , thanks for looking into this!
well, I can't use our Coding Standard on other projects because they use their own, and sometimes they are contradictory.
For example:
GoodOmens
. all our projects have a phpcs.xml for it.I have to edit the vscode settings to set it to PSR2 just while i'm working on, so the Warning banner isn't always popping up.
I'll look into the new setting, to see if i can work around.
@LC43 Also please note that per your description you may need to disable phpcs.autoConfigSearch to manually override the ruleset used.
@LC43 Did you manage to resolve your issues?
@ikappas , sorry missed the notification on this.
yes, with workspace settings i was able to work around it, thanks.
I usually work with a custom coding standard, GoodOmens.
When working on a project is using a custom phpcs.xml for coding standard B, vscode-phpcs complains that it can't find it.
i suspect its because vscode-phpcs uses
./vendor/bin/phpcs
if i enter the project directory and run
phpcs
, our CS is there.Other projects that either use a phpcs.xml with our CS, or have none, the vscode-phpcs works perfectly.
At least, i wouldn't mind having the warning once, but never repeatly show it on every save or new file open.
A solution would to have a flag, and in this line, check if the message has been displayed once already.
https://github.com/ikappas/vscode-phpcs/blob/f18e40713bae56316c768b2d1c44112f13350342/phpcs-server/src/linter.ts#L426