#427 Implement buffer variable overrides for all linter options
This commit is contained in:
parent
e80116cee0
commit
e97dada261
45 changed files with 117 additions and 108 deletions
|
@ -14,7 +14,7 @@ function! ale_linters#c#clang#GetCommand(buffer) abort
|
|||
" headers in the same directory.
|
||||
return 'clang -S -x c -fsyntax-only '
|
||||
\ . '-iquote ' . fnameescape(fnamemodify(bufname(a:buffer), ':p:h'))
|
||||
\ . ' ' . g:ale_c_clang_options . ' -'
|
||||
\ . ' ' . ale#Var(a:buffer, 'c_clang_options') . ' -'
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('c', {
|
||||
|
|
|
@ -6,7 +6,7 @@ let g:ale_c_cppcheck_options = get(g:, 'ale_c_cppcheck_options', '--enable=style
|
|||
|
||||
function! ale_linters#c#cppcheck#GetCommand(buffer) abort
|
||||
return 'cppcheck -q --language=c '
|
||||
\ . g:ale_c_cppcheck_options
|
||||
\ . ale#Var(a:buffer, 'c_cppcheck_options')
|
||||
\ . ' %t'
|
||||
endfunction
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ function! ale_linters#c#gcc#GetCommand(buffer) abort
|
|||
" headers in the same directory.
|
||||
return 'gcc -S -x c -fsyntax-only '
|
||||
\ . '-iquote ' . fnameescape(fnamemodify(bufname(a:buffer), ':p:h'))
|
||||
\ . ' ' . g:ale_c_gcc_options . ' -'
|
||||
\ . ' ' . ale#Var(a:buffer, 'c_gcc_options') . ' -'
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('c', {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue