0

I'm having trouble setting up PhpStorm to use PHP_CodeSniffer properly.

At first I was running PhpStorm on Windows through WSL2g, where I got to the point of selecting the coding standard in Editor > Inspections > PHP > Quality Tools > PHP CodeSniffer validation.

All the documentations tell me to select "Custom" and then provide a path to a custom .xml file. But I don't get that option.

enter image description here

I have tried to reset the IDE settings, invalidate caches, and the Repair option, but all those didn't help and also didn't seem like they'd reset the custom interpreter I configured or any other settings.

  • *"I even installed PhpStorm on Windows itself, and for some reason that retained all the settings I had done in the WSL2g version"* If you have opened the same project (folder) then it is should be expected as project-specific settings are stored in `.idea` subfolder. – LazyOne Jun 13 '22 at 11:50
  • Fair point, I wasn't sure of that because I didn't see changes in git, but of course that folder is ignored – Patrick Decoster Jun 13 '22 at 11:56
  • Other than that: please check the following section: https://www.jetbrains.com/help/phpstorm/using-php-code-sniffer.html#enabling-tool-inspection – LazyOne Jun 13 '22 at 12:02
  • This dropdown gets populated by running the tool. At `Settings | PHP | Quality Tools | PHP_CodeSniffer`, does the tool version appear in the window upon pressing `Validate`? – Eugene Morozov Jun 14 '22 at 11:28

0 Answers0