vim-syntastic / syntastic

Syntax checking hacks for vim
Do What The F*ck You Want To Public License
11.3k stars 1.14k forks source link

Do not override options cppcheck arguments from config file with cppcheck_args #2375

Open countsudoku opened 3 years ago

countsudoku commented 3 years ago

Configuration for cppcheck from a config file configured via g:syntastic_cppcheck_config_file was overwritten by content of g:syntastic_cpp_cppcheck_args. But for other checkers the options from the configured config file are appended to the call arguments of the checker. With this change the options from the cppcheck config file will also be appended and not be overwritten by any static configuration.

But be aware, that this will change the behavior of the config options for cppcheck.

lcd047 commented 3 years ago

If I recall correctly the idea at the time config files were added to cppcheck was to mimic what some Clang linters were doing -- they could use either a config file or command line options, not both at the same time. The point was to have am easy way to turn off the config files, or some such. But frankly that isn't particularly useful, so it wasn't implemented consistently to the other checkers. So your patch makes complete sense.

On the other hand syntastic has been largely superseded by ALE, its only useful these days to people who are stuck with Vim 7 for whatever reasons. It's probably way too late to make incompatible changes like this, they are likely to do more harm than good. shrug