From 36c552d9593c53cecf990ba76a20c673d7de7c19 Mon Sep 17 00:00:00 2001 From: Thomas Gideon Date: Wed, 25 Mar 2015 11:12:54 -0400 Subject: [PATCH] Try to get checkstyle running via makeprg. In OS X, anyway, this isn't working. I suspect an issue with temp file handling in MacVim but haven't yet found anything definitive. --- java.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/java.vim b/java.vim index 9931bb3..46943da 100644 --- a/java.vim +++ b/java.vim @@ -7,3 +7,10 @@ function JavaImpClean() endfunction :command JavaImpClean exec JavaImpClean() :nnoremap :JavaImpClean + +"let makeprg = 'java -cp /opt/boxen/homebrew/opt/checkstyle/libexec/checkstyle-6.0-all.jar -c '. vimrc_git . '/checkstyle.xml %:p' +let makeprg = 'checkstyle -c '. vimrc_git . '/checkstyle.xml ./%' + +autocmd FileType java let &makeprg=escape(makeprg, ' ') +autocmd FileType java set errorformat=%f:%l:\ %m,%f:%l:%v:\ %m,%-G%.%# +