2

I've installed PHP_CodeSniffer via Pear, and have Netbeans 7.3.1 installed. This is all on a Windows 8 system. When I go to configure Code Sniffer in Netbeans and point it towards my phpcs batch file (only one I have), I get the following error "The file C:\Program Files (x86)\PHP\phpcs.bat isn't the right Code Sniffer batch!"

Does anyone know how to fix this issue?

Arak Tai'Roth
  • 408
  • 1
  • 7
  • 24

1 Answers1

0

A colleague had a similar problem and the solution was, that the phpcs.bat was incorrect (the path to the PHP executable was missing). I seemed to be a misconfiguration of his Pyrus setup that lead to this.

So open a command prompt, go to the folder where your phpcs.bat is placed and try to execute phpcs -v. I guess you get an error (something like """" cannot be excuted [...]).

You can simply fix it. Open the batch, got to the last line and insert the full path to your php.exe between the two double quotes. After that, phpcs -v should output its name and version and the "Test" button in your Codesniffer dialog in Netbeans should work as well.

pschulz
  • 1
  • 1