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