Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

countsudoku
Copy link

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
Copy link
Collaborator

lcd047 commented Sep 6, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants