1 "============================================================================
3 "Description: Syntax checking plugin for docutil's reStructuredText files
4 "Maintainer: James Rowe <jnrowe 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.
11 "============================================================================
13 " We use rst2pseudoxml.py, as it is ever so marginally faster than the other
14 " rst2${x} tools in docutils.
16 if exists("loaded_rst_syntax_checker")
19 let loaded_rst_syntax_checker = 1
21 "bail if the user doesn't have rst2pseudoxml.py installed
22 if !executable("rst2pseudoxml.py")
26 function! SyntaxCheckers_rst_GetLocList()
27 let makeprg = 'rst2pseudoxml.py --report=1 --exit-status=1 ' .
28 \ shellescape(expand('%')) . ' /dev/null'
30 let errorformat = '%f:%l:\ (%tNFO/1)\ %m,
31 \%f:%l:\ (%tARNING/2)\ %m,
32 \%f:%l:\ (%tRROR/3)\ %m,
33 \%f:%l:\ (%tEVERE/4)\ %m,
36 return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })