scrooloose/syntastic — pull request #158 by technosophos (2012-01-27 19:54:39+00:00)
Title: Support for subtypes

As you know, I've been working to optimize the PHP syntax checking and code style validation with `php -l` and `phpcs`. I'm trying to figure out a way to visually distinguish syntax errors from coding standards violations.

This pull request is an effort to add "subtype" support that allows secondary checkers (like coding style validators) to use a different Sign than the standard checker. Only signs are impacted by this patch -- all other displays are left as they were (I think. I *intended* to leave them as they were). The code should be such that it does not require existing checkers to change.

Screenshot:
https://img.skitch.com/20120127-f9yyympua9e16d6tssdqaynp52.png

In the attached patch, I added support for a subtype called Style, which uses the SyntasticStyleError and SyntasticStyleWarning signs. I implemented PHP support and tested backward compatability with Ruby.

I think this method should make it relatively easy (though perhaps not trivially so) to add more subtypes.

I know this is sort of a change in the direction you've taken, and if you don't like this, I will not feel bad about having the pull rejected. I know that what's useful for me may not be generally desirable for everyone else.