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

1

5

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.

Zirconia answered 12/6, 2014 at 8:23 Comment(0)
M
10

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.

Menendez answered 15/6, 2014 at 22:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.