mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-24 21:11:28 +08:00
Add support for cppcheck (#126)
* Add support for cppcheck * Fix vint error in cppcheck handler * Add vader test for CppCheck format handler
This commit is contained in:
22
ale_linters/cpp/cppcheck.vim
Normal file
22
ale_linters/cpp/cppcheck.vim
Normal file
@@ -0,0 +1,22 @@
|
||||
" Author: Bart Libert <bart.libert@gmail.com>
|
||||
" Description: cppcheck linter for cpp files
|
||||
|
||||
if exists('g:loaded_ale_linters_cpp_cppcheck')
|
||||
finish
|
||||
endif
|
||||
|
||||
let g:loaded_ale_linters_cpp_cppcheck = 1
|
||||
|
||||
" Set this option to change the cppcheck options
|
||||
if !exists('g:ale_cpp_cppcheck_options')
|
||||
let g:ale_cpp_cppcheck_options = '--enable=style'
|
||||
endif
|
||||
|
||||
call ale#linter#Define('cpp', {
|
||||
\ 'name': 'cppcheck',
|
||||
\ 'output_stream': 'both',
|
||||
\ 'executable': 'cppcheck',
|
||||
\ 'command': g:ale#util#stdin_wrapper . ' .cpp cppcheck -q --language=c++ '
|
||||
\ . g:ale_cpp_cppcheck_options,
|
||||
\ 'callback': 'ale#handlers#HandleCppCheckFormat',
|
||||
\})
|
||||
Reference in New Issue
Block a user