mirror of
https://github.com/dense-analysis/ale.git
synced 2026-10-01 16:03:44 +08:00
Fix #257 in preparation for #427, standardise options with fallbacks, and make it so every value can be computed dynamically
This commit is contained in:
1 parent
2f009690c3
commit
706dd050f2
16 files changed
+69
-36
No files matched your search
@@ -4,12 +4,16 @@
|
||||
" Set this option to change the cppcheck options
|
||||
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
|
||||
\ . ' %t'
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('c', {
|
||||
\ 'name': 'cppcheck',
|
||||
\ 'output_stream': 'both',
|
||||
\ 'executable': 'cppcheck',
|
||||
\ 'command': 'cppcheck -q --language=c '
|
||||
\ . g:ale_c_cppcheck_options
|
||||
\ . ' %t',
|
||||
\ 'command_callback': 'ale_linters#c#cppcheck#GetCommand',
|
||||
\ 'callback': 'ale#handlers#HandleCppCheckFormat',
|
||||
\})
|
||||
Reference in new issue
Block a user