Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between sublimelinter-php and sublimelinter-phpcs?

From what I know, CodeSniffer follows a certain set of coding standards and checks your code if it follows the said standards. But sublimelinter-php does this too. Are they different or are they just the same? Because I installed both plugins on my Sublime Text 3.

like image 701
Gannicus Avatar asked Jun 12 '14 08:06

Gannicus


1 Answers

SublimeLinter-phpcs allows you to run PHP_CodeSniffer over your code, ensuring it conforms to whatever coding standard you use.

SublimeLinter-php allows you tun run php -l over your code, ensuring that it does not contain any syntax errors. It does not seem to check any coding standards.

PHP_CodeSniffer does not actually check code for syntax errors, so having both installed is probably a good idea. Use SublimeLinter-php to make sure your code is going to run, and SublimeLinter-phpcs to make sure your coding standards are being followed.

like image 75
Greg Sherwood Avatar answered Sep 19 '22 09:09

Greg Sherwood