diff options
author | w0rp <w0rp@users.noreply.github.com> | 2017-02-27 22:21:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-27 22:21:42 +0000 |
commit | 7a92c3a04629da1f6b2e0390c493e02035b816ea (patch) | |
tree | d115c729cd89766e1d0f0e3d7ae8b3e6866e0fc0 /ale_linters | |
parent | b2fe1b2567a1a1e6a5e2ff805a46fa7f546ce62c (diff) | |
parent | b5e603bbc5127ad6a78913054f48de733724c435 (diff) | |
download | ale-7a92c3a04629da1f6b2e0390c493e02035b816ea.zip |
Merge pull request #366 from kbenzie/cmakelint
Add cmakelint support for cmake filetype
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/cmake/cmakelint.vim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ale_linters/cmake/cmakelint.vim b/ale_linters/cmake/cmakelint.vim new file mode 100644 index 00000000..fb876c66 --- /dev/null +++ b/ale_linters/cmake/cmakelint.vim @@ -0,0 +1,24 @@ +" 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 g:ale_cmake_cmakelint_executable +endfunction + +function! ale_linters#cmake#cmakelint#Command(buffer) abort + return ale_linters#cmake#cmakelint#Executable(a:buffer) + \ . ' ' . g:ale_cmake_cmakelint_options . ' %t' +endfunction + +call ale#linter#Define('cmake', { +\ 'name': 'cmakelint', +\ 'executable_callback': 'ale_linters#cmake#cmakelint#Executable', +\ 'command_callback': 'ale_linters#cmake#cmakelint#Command', +\ 'callback': 'ale#handlers#HandleUnixFormatAsWarning', +\}) |