syntastic/syntax_checkers/python/mypy.vim

36 lines
938 B
VimL
Raw Normal View History

2014-09-27 22:35:51 -04:00
"============================================================================
"File: mypy.vim
"Description: Syntax checking plugin for syntastic.vim
"Author: Russ Hewgill <Russ dot Hewgill at gmail dot com>
"
"============================================================================
if exists("g:loaded_syntastic_python_mypy_checker")
finish
endif
let g:loaded_syntastic_python_mypy_checker = 1
2014-09-28 04:28:26 -04:00
let s:save_cpo = &cpo
set cpo&vim
2014-09-27 22:35:51 -04:00
function! SyntaxCheckers_python_mypy_GetLocList() dict
2014-09-28 04:28:26 -04:00
let makeprg = self.makeprgBuild({})
2014-09-27 22:35:51 -04:00
let errorformat = '%f\, line %l: %m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
2014-09-28 04:28:26 -04:00
\ 'defaults': { 'type': 'E' },
\ 'returns': [0, 1] })
2014-09-27 22:35:51 -04:00
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'python',
\ 'name': 'mypy'})
2014-09-28 04:28:26 -04:00
let &cpo = s:save_cpo
unlet s:save_cpo
2014-09-27 22:35:51 -04:00
2014-09-28 04:28:26 -04:00
" vim: set et sts=4 sw=4: