Cannot load Custom Code Sniffer rules into PHP Storm

Answered

Hello,

I want to use custom ruleset for PHP CS. I go into Preferences -> Editor -> Inspections -> PHP_CodeSniffer validation and in Coding Standard i puck "Custom". The problem is, I cannot use custom ruleset. If I load e.g. phpcs.xml, I get an error in Storm:

phpcs: ERROR: the "phpcs.xml" coding standard is not installed. The installed coding standards are PEAR, Zend, PSR2, MySource, Squiz, PSR1 and PSR12

It works, if I create folder in vendor ... Standards, but I don't want to do so, as I'll update this package. Also, I use Code_Sniffer in Quality Tools from Docker. May this collide with Inspections? So, how can I apply custom ruleset then?

2 comments
Comment actions Permalink

It's not obvious, but you need to specify the remote path (the container one) to the ruleset, not the local one: https://youtrack.jetbrains.com/issue/WI-50906

0
Comment actions Permalink

Worked like a charm, thanks!

0

Please sign in to leave a comment.