Sublime Forum

PHP Syntax Checking

#1

I’m new to Sublime and trying it out and so far so good. I have been looking for a way to add Syntax Checking for PHP, and hopefully Javascript/JQuery, CSS, and HTML too. I have installed Package Control and found both “SublimeLinter” and “PHP Code Sniffer” but cannot seem to get either one to show me errors. I did get SublimeLinter to show annotations (TODO) so I believe I am installing them correctly but not sure what I’m doing wrong at this point. I have this code and am hoping to see a warning or something in the line numbering gutter about the various errors. Any ideas?

if ($x=1) 
	'yes';
}

Thanks,
Andrew

0 Likes

#2

You have one actual error in that code snippet, and SublimeLinter shows me that just fine. (The unmatched bracket.) Do you get any messages in the console indicating that there might be problems?

0 Likes

#3

Thanks for the reply. I do not get anything in the console and in fact just went through tutsplus.com/lesson/sublime-linter/ (found from the @sublimehq Twitter feed) and did not get anything when doing the tutorial.

I did notice at about 1:55 he goes to Command Pallette and has a ton of SublimeLinter options. My only option is to Extract Annotations so I believe that has something to do with it but I don’t know how to get all the SublimeLinter options.

FWIW, I am using Win7 and the Unregistered version since I’m still trying out ST2. The only other issue I’ve had is changing the theme so I’m not sure if there are some things that don’t work until you register or what, but didn’t see anything mentioning that.

Thanks,
Andrew

0 Likes