diff --git a/syntax_checkers/ats/patscc.vim b/syntax_checkers/ats/patscc.vim index 4355408..892a79d 100644 --- a/syntax_checkers/ats/patscc.vim +++ b/syntax_checkers/ats/patscc.vim @@ -5,6 +5,14 @@ let g:loaded_syntastic_ats_patscc_checker = 1 let g:syntastic_ats_patscc_exec = 'patscc' +function! Cleanup(errors) abort " {{{2 + + exec 'silent !rm -f a.out' + + return a:errors + +endfunction " }}}2 + function! SyntaxCheckers_ats_patscc_GetLocList() dict let makeprg = self.makeprgBuild({ \ 'exe': self.getExec(), @@ -18,12 +26,12 @@ function! SyntaxCheckers_ats_patscc_GetLocList() dict let loclist = SyntasticMake({ \ 'makeprg': makeprg, \ 'errorformat': errorformat }) - return loclist - exec 'silent !rm -f a.out' + return loclist endfunction call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'ats', - \ 'name': 'patscc'}) + \ 'name': 'patscc', + \ 'postprocess': 'Cleanup'})