vim-syntastic / syntastic

Syntax checking hacks for vim
Do What The F*ck You Want To Public License
11.3k stars 1.14k forks source link

checkpatch.pl checks more filetypes, must be global #1829

Closed vivien closed 7 years ago

vivien commented 8 years ago

In addition to the c filetype, ./scripts/checkpatch.pl supports other filetypes such as:

The only nitpick here is that checkpath.pl must be called without the --file option to check .patch files.

Cc: @daniel-walker @d-k-c

lcd047 commented 8 years ago

If you post a PR I'll consider it.

vivien commented 8 years ago

I didn't dig that much in the code yet and thus I'm not sure how to handle such "global" checkers, as well as the .patch case without the need for the -f option.

lcd047 commented 8 years ago

You won't be able to handle the .patch case. Syntastic can't check diff files, for reasons that have to do with conflicts with vimdiff, and with the incompleteness of Vim's API.

That said, I'm working on a patch that would make it possible to run checkers of "foreign" filetypes against any file, and that would address your problem. I'm afraid I can't give you any ETA for it though.

vivien commented 8 years ago

That'll indeed fix the diff filetype case. What about having a "global" checker, registered for different filetypes? Can Syntastic handle that?

lcd047 commented 8 years ago

There is no such thing as a "global" checker, there are only checkers associated to concrete filetypes. There are redirection mechanisms (they are explained in the guide), but that's about all. If you want generic checkers you should consider using compiler sets (see :h :compiler). Syntastic comes from there, and is moving in the opposite direction. shrug

lcd047 commented 7 years ago

It's now possible to run checkers of "foreign" filetypes against any file. Commit adf899f.