diagnostic-languageserver icon indicating copy to clipboard operation
diagnostic-languageserver copied to clipboard

How to use phpcs.xml.dist configuration file

Open caschbre opened this issue 4 years ago • 4 comments

I've setup PHP_CodeSniffer (phpcs) using the settings outlined in the wiki. I've also created a phpcs.xml.dist configuration file, however it does not seem to be picking up the rule exclusions I have setup in the xml file.

Is there additional configuration necessary to pick up that config file?

Here are my settings...

https://gist.github.com/caschbre/22971e36fbcdc17d089fc424b491b598

caschbre avatar Jan 22 '21 16:01 caschbre

Is that rootPatterns setting correct?

iamcco avatar Jan 25 '21 03:01 iamcco

I created the .projectroot file and put in my project root. Easier to have several different tools all target the same place. I did try using the rootPatterns from the wiki and had the same result.

caschbre avatar Jan 25 '21 03:01 caschbre

CodeSniffer does run and does lint to the standards in the args.... but it's not using using my exclusions from the phpcs.xml.dist document.

caschbre avatar Jan 25 '21 03:01 caschbre

set "diagnostic-languageserver.trace.server": "verbose" and checkout output channel of diagnostic-languageserver

iamcco avatar Jan 25 '21 05:01 iamcco