1
0
Fork 0
mirror of synced 2024-11-03 00:58:59 -04:00
ultimate-vim/sources_non_forked/ale/ale_linters/cmake/cmakelint.vim

25 lines
860 B
VimL
Raw Normal View History

" Author: Kenneth Benzie <k.benzie83@gmail.com>
" Description: cmakelint for cmake files
let g:ale_cmake_cmakelint_executable =
\ get(g:, 'ale_cmake_cmakelint_executable', 'cmakelint')
let g:ale_cmake_cmakelint_options =
\ get(g:, 'ale_cmake_cmakelint_options', '')
function! ale_linters#cmake#cmakelint#Executable(buffer) abort
return ale#Var(a:buffer, 'cmake_cmakelint_executable')
endfunction
function! ale_linters#cmake#cmakelint#Command(buffer) abort
return ale_linters#cmake#cmakelint#Executable(a:buffer)
\ . ' ' . ale#Var(a:buffer, 'cmake_cmakelint_options') . ' %t'
endfunction
call ale#linter#Define('cmake', {
\ 'name': 'cmakelint',
2019-03-08 06:04:56 -05:00
\ 'executable': function('ale_linters#cmake#cmakelint#Executable'),
\ 'command': function('ale_linters#cmake#cmakelint#Command'),
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
\})