X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/ale_linters/cpp/cpplint.vim diff --git a/.vim/bundle/ale/ale_linters/cpp/cpplint.vim b/.vim/bundle/ale/ale_linters/cpp/cpplint.vim new file mode 100644 index 00000000..f1f6ce7f --- /dev/null +++ b/.vim/bundle/ale/ale_linters/cpp/cpplint.vim @@ -0,0 +1,20 @@ +" Author: Dawid Kurek https://github.com/dawikur +" Description: cpplint for cpp files + +call ale#Set('cpp_cpplint_executable', 'cpplint') +call ale#Set('cpp_cpplint_options', '') + +function! ale_linters#cpp#cpplint#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'cpp_cpplint_options') + + return '%e' . ale#Pad(l:options) . ' %s' +endfunction + +call ale#linter#Define('cpp', { +\ 'name': 'cpplint', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'cpp_cpplint_executable')}, +\ 'command': function('ale_linters#cpp#cpplint#GetCommand'), +\ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat', +\ 'lint_file': 1, +\})