Small fixes.

This commit is contained in:
LCD 47 2013-05-21 15:02:42 +03:00
parent ea827bfa06
commit f4a5842d18
4 changed files with 4 additions and 7 deletions

View File

@ -50,6 +50,7 @@ function! SyntaxCheckers_c_gcc_GetLocList()
\ '%f:%l: %tarning: %m,'. \ '%f:%l: %tarning: %m,'.
\ '%f:%l: %m', \ '%f:%l: %m',
\ 'makeprg_main': '-x c -fsyntax-only', \ 'makeprg_main': '-x c -fsyntax-only',
\ 'makeprg_headers': '-x c',
\ 'headers_pattern': '\.h$' }) \ 'headers_pattern': '\.h$' })
endfunction endfunction

View File

@ -45,6 +45,7 @@ function! SyntaxCheckers_cpp_gcc_GetLocList()
\ '%f:%l: %tarning: %m,'. \ '%f:%l: %tarning: %m,'.
\ '%f:%l: %m', \ '%f:%l: %m',
\ 'makeprg_main': '-x c++ -fsyntax-only', \ 'makeprg_main': '-x c++ -fsyntax-only',
\ 'makeprg_headers': '-x c++',
\ 'headers_pattern': '\.\(h\|hpp\|hh\)$' }) \ 'headers_pattern': '\.\(h\|hpp\|hh\)$' })
endfunction endfunction

View File

@ -44,7 +44,7 @@ function! SyntaxCheckers_d_dmd_GetLocList()
\ 'errorformat': \ 'errorformat':
\ '%-G%f:%s:,%f(%l): %m,' . \ '%-G%f:%s:,%f(%l): %m,' .
\ '%f:%l: %m', \ '%f:%l: %m',
\ 'makeprg_main': '-c', \ 'makeprg_main': '-c ' . syntastic#c#NullOutput('d'),
\ 'headers_pattern': '\.di$' }) \ 'headers_pattern': '\.di$' })
endfunction endfunction

View File

@ -19,15 +19,10 @@ function! SyntaxCheckers_nasm_nasm_IsAvailable()
endfunction endfunction
function! SyntaxCheckers_nasm_nasm_GetLocList() function! SyntaxCheckers_nasm_nasm_GetLocList()
if has("win32")
let outfile="NUL"
else
let outfile="/dev/null"
endif
let wd = shellescape(expand("%:p:h") . "/") let wd = shellescape(expand("%:p:h") . "/")
let makeprg = syntastic#makeprg#build({ let makeprg = syntastic#makeprg#build({
\ 'exe': 'nasm', \ 'exe': 'nasm',
\ 'args': '-X gnu -f elf -I ' . wd . ' -o ' . outfile, \ 'args': '-X gnu -f elf -I ' . wd . ' ' . syntastic#c#NullOutput('nasm'),
\ 'subchecker': 'nasm' }) \ 'subchecker': 'nasm' })
let errorformat = '%f:%l: %t%*[^:]: %m' let errorformat = '%f:%l: %t%*[^:]: %m'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })