mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Update Ale.
This commit is contained in:
20
sources_non_forked/ale/ale_linters/c/cpplint.vim
Normal file
20
sources_non_forked/ale/ale_linters/c/cpplint.vim
Normal file
@ -0,0 +1,20 @@
|
||||
" Author: Justin Huang <justin.y.huang@live.com>
|
||||
" 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,
|
||||
\})
|
5
sources_non_forked/ale/ale_linters/c/cspell.vim
Normal file
5
sources_non_forked/ale/ale_linters/c/cspell.vim
Normal file
@ -0,0 +1,5 @@
|
||||
scriptencoding utf-8
|
||||
" Author: David Houston <houstdav000>
|
||||
" Description: cspell support for C files.
|
||||
|
||||
call ale#handlers#cspell#DefineLinter('c')
|
Reference in New Issue
Block a user