diff options
Diffstat (limited to 'ale_linters/cuda')
-rw-r--r-- | ale_linters/cuda/nvcc.vim | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/ale_linters/cuda/nvcc.vim b/ale_linters/cuda/nvcc.vim index 3764fe9d..a3678910 100644 --- a/ale_linters/cuda/nvcc.vim +++ b/ale_linters/cuda/nvcc.vim @@ -4,20 +4,15 @@ call ale#Set('cuda_nvcc_executable', 'nvcc') call ale#Set('cuda_nvcc_options', '-std=c++11') -function! ale_linters#cuda#nvcc#GetExecutable(buffer) abort - return ale#Var(a:buffer, 'cuda_nvcc_executable') -endfunction - function! ale_linters#cuda#nvcc#GetCommand(buffer) abort " Unused: use ale#util#nul_file " let l:output_file = ale#util#Tempname() . '.ii' " call ale#engine#ManageFile(a:buffer, l:output_file) - return ale#Escape(ale_linters#cuda#nvcc#GetExecutable(a:buffer)) - \ . ' -cuda ' - \ . ale#c#IncludeOptions(ale#c#FindLocalHeaderPaths(a:buffer)) - \ . ale#Var(a:buffer, 'cuda_nvcc_options') . ' %s' - \ . ' -o ' . g:ale#util#nul_file + return '%e -cuda' + \ . ale#Pad(ale#c#IncludeOptions(ale#c#FindLocalHeaderPaths(a:buffer))) + \ . ale#Pad(ale#Var(a:buffer, 'cuda_nvcc_options')) + \ . ' %s -o ' . g:ale#util#nul_file endfunction function! ale_linters#cuda#nvcc#HandleNVCCFormat(buffer, lines) abort @@ -49,7 +44,7 @@ endfunction call ale#linter#Define('cuda', { \ 'name': 'nvcc', \ 'output_stream': 'stderr', -\ 'executable_callback': 'ale_linters#cuda#nvcc#GetExecutable', +\ 'executable_callback': ale#VarFunc('cuda_nvcc_executable'), \ 'command_callback': 'ale_linters#cuda#nvcc#GetCommand', \ 'callback': 'ale_linters#cuda#nvcc#HandleNVCCFormat', \ 'lint_file': 1, |