syntastic/syntax_checkers/json/jsonval.vim
millermedeiros 2698e26e71 add json syntax checker. see #74.
still need to wait for zaach/jsonlint#15 before merging into master.
2011-12-16 14:22:20 -02:00

18 lines
1001 B
VimL

"============================================================================
"File: jsonval.vim
"Description: JSON syntax checker - using jsonval
"Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"============================================================================
function! SyntaxCheckers_json_GetLocList()
" based on https://gist.github.com/1196345
let makeprg = 'jsonval '. shellescape(expand('%'))
let errorformat = '%E%f:\ %m\ at\ line\ %l,%-G%.%#'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'bufnr': bufnr('')} })
endfunction