scrutinizer-ci / scrutinizer

Legacy repository - archives past feature requests/bug reports
https://scrutinizer-ci.com/docs
140 stars 36 forks source link

php_code_sniffer: phpcs not found #309

Closed derchrisuk closed 9 years ago

derchrisuk commented 9 years ago

Hi,

I asked about this problem some days ago. Since a few days/weeks, our Inspections fail with the following error:

Running analyzer "php_code_sniffer"...

  [RuntimeException]                                                                                                                                                                          
  An exception occurred while analyzing "imprint.php": The command "phpcs --standard='PSR2' --tab-width=0 --encoding=utf8 --report-checkstyle='/tmp/phpcsDEB999' '/tmp/phpcsrM4xni'" failed.  
  Exit Code: 127(Command not found)                                                                                                                                                           

  Output:                                                                                                                                                                                     
  ================                                                                                                                                                                            

  Error Output:                                                                                                                                                                               
  ================                                                                                                                                                                            
  sh: 1: phpcs: not found   

I have been told that PHPCS had been removed, and I should also remove it from my config. Asked about the reasons behind this, or an alternative for the checks.

Now I looked through the other open issues, and found #286 In there you said that PHP has been updated to 2.2

So I'm a little bit lost at the moment with my issue, as it is still failing.

schmittjoh commented 9 years ago

Could you copy/paste your configuration? In general, if you remove all the command: references this should work just fine.

derchrisuk commented 9 years ago

Ah, now I know what you mean. I thought you had removed PHPCS completely. Yes, there are command: phpcs entries in the config. I removed them now, but still get an error. But due to the UI changes you did, I can no longer see the error. So not sure if this is another problem, or something else.

schmittjoh commented 9 years ago

Do you have a link to the inspection?

derchrisuk commented 9 years ago

https://scrutinizer-ci.com/g/webSPELL/webSPELL/inspections/600908a4-43cf-4d25-9333-6fb64a44d495

I changed the Global Config, as well as the .scrutinizer file. Not sure what will be used first.

All I did was a retry of a failed inspection after the changes I made.

schmittjoh commented 9 years ago

Retried inspections run with the same configuration, you'll probably need to run a fresh inspection. In that inspection, there is still the same error because of this.

derchrisuk commented 9 years ago

Yes, new inspections looking good so far. I'm interested why it suddenly stopped. Did the filename/path changed for PHPCS?

schmittjoh commented 9 years ago

Yes, we are bundling this now instead of making it available globally. Closing this here since it's working again :)