From 9d9e114a2542952a82e606a20876718927f6463b Mon Sep 17 00:00:00 2001 From: Moritz Schneider Date: Mon, 6 Sep 2021 15:15:42 +0200 Subject: [PATCH] Do not override options from config file with cppcheck_args --- doc/syntastic-checkers.txt | 4 ++-- syntax_checkers/c/cppcheck.vim | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/syntastic-checkers.txt b/doc/syntastic-checkers.txt index 1f6fc5f77..687b4fb56 100644 --- a/doc/syntastic-checkers.txt +++ b/doc/syntastic-checkers.txt @@ -693,8 +693,8 @@ Additionally: *'g:syntastic_cppcheck_config_file'* Type: string Default: unset -File containing compilation flags (such as defines or include directories), -one option per line (cf. |syntastic-config-files|). +File containing additional compilation flags (such as defines or include +directories), one option per line (cf. |syntastic-config-files|). See also: |syntastic-cpp-cppcheck|. diff --git a/syntax_checkers/c/cppcheck.vim b/syntax_checkers/c/cppcheck.vim index 22ca9c9fc..19c1e23ae 100644 --- a/syntax_checkers/c/cppcheck.vim +++ b/syntax_checkers/c/cppcheck.vim @@ -21,7 +21,7 @@ function! SyntaxCheckers_c_cppcheck_GetLocList() dict let buf = bufnr('') let makeprg = self.makeprgBuild({ - \ 'args': syntastic#c#ReadConfig(syntastic#util#bufVar(buf, 'cppcheck_config_file')), + \ 'args_before': syntastic#c#ReadConfig(syntastic#util#bufVar(buf, 'cppcheck_config_file')), \ 'args_after': '-q --enable=style' }) let errorformat =