From 58d88e149f04f8a5906d478571243ddc45570df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 7 Apr 2019 17:44:43 +0200 Subject: [PATCH] Add --addon= command line option --- cli/cmdlineparser.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 5244d803d..4674c550c 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -128,6 +128,9 @@ bool CmdLineParser::parseFromArgs(int argc, const char* const argv[]) return true; } + else if (std::strncmp(argv[i], "--addon=", 8) == 0) + mSettings->addons.emplace_back(argv[i]+8); + else if (std::strncmp(argv[i], "--cppcheck-build-dir=", 21) == 0) { mSettings->buildDir = Path::fromNativeSeparators(argv[i] + 21); if (endsWith(mSettings->buildDir, '/')) @@ -920,6 +923,8 @@ void CmdLineParser::printHelp() "If a directory is given instead of a filename, *.cpp, *.cxx, *.cc, *.c++, *.c,\n" "*.tpp, and *.txx files are checked recursively from the given directory.\n\n" "Options:\n" + " --addon=\n" + " Execute addon. i.e. cert.\n" " --cppcheck-build-dir=\n" " Analysis output directory. Useful for various data.\n" " Some possible usages are; whole program analysis,\n"