37 lines
969 B
VimL
Raw Normal View History

2014-09-27 19:35:51 -07:00
"============================================================================
"File: mypy.vim
2017-09-15 21:04:16 +03:00
"Description: Syntax checking plugin for syntastic
2014-09-27 19:35:51 -07:00
"Author: Russ Hewgill <Russ dot Hewgill at gmail dot com>
"
"============================================================================
2015-03-25 18:44:34 +02:00
if exists('g:loaded_syntastic_python_mypy_checker')
2014-09-27 19:35:51 -07:00
finish
endif
let g:loaded_syntastic_python_mypy_checker = 1
2014-09-28 11:28:26 +03:00
let s:save_cpo = &cpo
set cpo&vim
2014-09-27 19:35:51 -07:00
function! SyntaxCheckers_python_mypy_GetLocList() dict
2014-09-28 11:28:26 +03:00
let makeprg = self.makeprgBuild({})
2014-09-27 19:35:51 -07:00
let errorformat = '%f:%l:%m'
2014-09-27 19:35:51 -07:00
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
2014-09-28 11:28:26 +03:00
\ 'defaults': { 'type': 'E' },
\ 'returns': [0, 1],
\ 'preprocess': 'mypy' })
2014-09-27 19:35:51 -07:00
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'python',
\ 'name': 'mypy'})
2014-09-28 11:28:26 +03:00
let &cpo = s:save_cpo
unlet s:save_cpo
2014-09-27 19:35:51 -07:00
2015-01-04 12:46:54 +02:00
" vim: set sw=4 sts=4 et fdm=marker: