From b2f1a0aaa9e652313f25f722ac09af3e3b5be7f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 5 Nov 2021 18:57:26 +0100 Subject: [PATCH] Loading cppcheck.cfg after --project to extend settings provided by project --- cli/cmdlineparser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index a517fda77..5dff8d26f 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -121,8 +121,6 @@ bool CmdLineParser::parseFromArgs(int argc, const char* const argv[]) mSettings->exename = argv[0]; - mSettings->loadCppcheckCfg(Path::getPathFromFilename(argv[0]) + "cppcheck.cfg"); - for (int i = 1; i < argc; i++) { if (argv[i][0] == '-') { // User define @@ -919,6 +917,8 @@ bool CmdLineParser::parseFromArgs(int argc, const char* const argv[]) } } + mSettings->loadCppcheckCfg(Path::getPathFromFilename(argv[0]) + "cppcheck.cfg"); + // Default template format.. if (mSettings->templateFormat.empty()) { mSettings->templateFormat = "{bold}{file}:{line}:{column}: {red}{inconclusive:{magenta}}{severity}:{inconclusive: inconclusive:}{default} {message} [{id}]{reset}\\n{code}";