From b5e603bbc5127ad6a78913054f48de733724c435 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Sat, 25 Feb 2017 17:27:03 +0000 Subject: Add cmakelint support for cmake filetype --- ale_linters/cmake/cmakelint.vim | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 ale_linters/cmake/cmakelint.vim (limited to 'ale_linters') 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 +" 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', +\}) -- cgit v1.2.3