0

I have a dockerized WSL with PHP code sniffer installed. Now I stuck to set up "wordpress" coding standard. When I run phpcs -i from WSL it then shows

The installed coding standards are PSR2, PEAR, PSR12, MySource, Squiz, Zend, PSR1, WordPress-Core, WordPress-Docs, WordPress-Extra and WordPress

but the "coding standards" in the settings are still Pear, PSR1, PSR12, PSR2, Squiz, Zend, Custom. How to make it understand that I have WordPress coding standard?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
John Smith
  • 6,129
  • 12
  • 68
  • 123
  • of course Phpstorm was restarted since then – John Smith Dec 07 '22 at 14:20
  • 1
    `installed_paths` -- does it points to the right folder? In the config file and/or the IDE ("Installed standards path" field)? https://youtrack.jetbrains.com/issue/WI-66502/Custom-CodeSniffer-ruleset-cannot-locate-dependencies.#focus=Comments-27-6057182.0-0 – LazyOne Dec 07 '22 at 15:11
  • Yepp, installed_paths does, but when I manually set "installed standard path" it says phpcs: ERROR: the file "\set\path" does not exists. But Phpstorm looks for a file here not a directory - while this dialog enables only directories.... – John Smith Dec 07 '22 at 15:24
  • 1
    *"ERROR: the file "\set\path" does not exists. But Phpstorm looks for a file here not a directory"* I'm not sure at all .. but it could be affected by "dockerized WSL" -- not using the path on the target file system... TBH -- I do not use PHP_CS that much, only local (Windows host OS, nothing like Docker/WSL or remote) and standard rules only (which works perfectly fine for me) and therefore cannot generate many ideas for your setup. – LazyOne Dec 07 '22 at 15:32

0 Answers0