Skip to content

Commit

Permalink
Make way for Neomake! makers to be shared
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Harper committed Feb 5, 2015
1 parent b19be85 commit 293e2c8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion autoload/neomake.vim
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function! neomake#GetMaker(name, makepath, ...) abort
if len(ft)
let maker = eval('neomake#makers#ft#'.ft.'#'.a:name.'()')
else
let maker = {}
let maker = eval('neomake#makers#'.a:name.'#'.a:name.'()')
endif
catch /^Vim\%((\a\+)\)\=:E117/
let maker = {}
Expand Down
15 changes: 15 additions & 0 deletions autoload/neomake/makers/cargo.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
" vim: ts=4 sw=4 et

function! neomake#makers#cargo#cargo()
return {
\ 'args': ['build'],
\ 'errorformat':
\ '%-G%f:%s:,' .
\ '%f:%l:%c: %trror: %m,' .
\ '%f:%l:%c: %tarning: %m,' .
\ '%f:%l:%c: %m,'.
\ '%f:%l: %trror: %m,'.
\ '%f:%l: %tarning: %m,'.
\ '%f:%l: %m',
\ }
endfunction
15 changes: 0 additions & 15 deletions autoload/neomake/makers/ft/rust.vim
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,6 @@ function! neomake#makers#ft#rust#EnabledMakers()
return ['rustc']
endfunction

"TODO: when #47 is fulfiled, add this as a `Neomake!` maker for rust
function! neomake#makers#ft#rust#cargo()
return {
\ 'args': ['build'],
\ 'errorformat':
\ '%-G%f:%s:,' .
\ '%f:%l:%c: %trror: %m,' .
\ '%f:%l:%c: %tarning: %m,' .
\ '%f:%l:%c: %m,'.
\ '%f:%l: %trror: %m,'.
\ '%f:%l: %tarning: %m,'.
\ '%f:%l: %m',
\ }
endfunction

function! neomake#makers#ft#rust#rustc()
return {
\ 'args': ['-o', neomake#utils#DevNull()],
Expand Down

0 comments on commit 293e2c8

Please sign in to comment.