1 "============================================================================
3 "Description: Syntax checking plugin for syntastic.vim using `csslint` CLI tool (http://csslint.net).
4 "Maintainer: Ory Band <oryband at gmail dot com>
5 "License: This program is free software. It comes without any warranty,
6 " to the extent permitted by applicable law. You can redistribute
7 " it and/or modify it under the terms of the Do What The Fuck You
8 " Want To Public License, Version 2, as published by Sam Hocevar.
9 " See http://sam.zoy.org/wtfpl/COPYING for more details.
10 "============================================================================
11 if exists("loaded_css_syntax_checker")
14 let loaded_css_syntax_checker = 1
16 " Bail if the user doesn't have `csslint` installed.
17 if !executable("csslint")
21 function! SyntaxCheckers_css_GetLocList()
22 let makeprg = 'csslint --format=compact '.shellescape(expand('%'))
24 " Print CSS Lint's error/warning messages from compact format. Ignores blank lines.
25 let errorformat = '%-G,%-G%f: lint free!,%f: line %l\, col %c\, %trror - %m,%f: line %l\, col %c\, %tarning - %m,%f: line %l\, col %c\, %m,'
27 return SyntasticMake({ 'makeprg': makeprg,
28 \ 'errorformat': errorformat,
29 \ 'defaults': {'bufnr': bufnr("")} })