]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/ale_linters/cmake/cmakelint.vim

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Do not set EDITOR/VISUAL for shell
[etc/vim.git] / .vim / bundle / ale / ale_linters / cmake / cmakelint.vim
1 " Author: Kenneth Benzie <k.benzie83@gmail.com>
2 " Description: cmakelint for cmake files
3
4 let g:ale_cmake_cmakelint_executable =
5 \   get(g:, 'ale_cmake_cmakelint_executable', 'cmakelint')
6
7 let g:ale_cmake_cmakelint_options =
8 \   get(g:, 'ale_cmake_cmakelint_options', '')
9
10 function! ale_linters#cmake#cmakelint#Executable(buffer) abort
11     return ale#Var(a:buffer, 'cmake_cmakelint_executable')
12 endfunction
13
14 function! ale_linters#cmake#cmakelint#Command(buffer) abort
15     return ale_linters#cmake#cmakelint#Executable(a:buffer)
16     \   . ' ' . ale#Var(a:buffer, 'cmake_cmakelint_options') . ' %t'
17 endfunction
18
19 call ale#linter#Define('cmake', {
20 \   'name': 'cmakelint',
21 \   'executable': function('ale_linters#cmake#cmakelint#Executable'),
22 \   'command': function('ale_linters#cmake#cmakelint#Command'),
23 \   'callback': 'ale#handlers#unix#HandleAsWarning',
24 \})