diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 0792dfde3..a02447c8f 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -296,18 +296,6 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[]) else if (std::strcmp(argv[i], "-q") == 0 || std::strcmp(argv[i], "--quiet") == 0) _settings->quiet = true; - // Append user-defined code to checked source code - else if (std::strncmp(argv[i], "--append=", 9) == 0) { - // This is deprecated and will be removed in 1.80 - PrintMessage("cppcheck: '--append' is deprecated and will be removed in version 1.80. To supply additional information to cppcheck, use --library or --include."); - - const std::string filename = 9 + argv[i]; - if (!_settings->append(filename)) { - PrintMessage("cppcheck: Couldn't open the file: \"" + filename + "\"."); - return false; - } - } - // Check configuration else if (std::strcmp(argv[i], "--check-config") == 0) { _settings->checkConfiguration = true; diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index eb1695920..94b070f0d 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -272,7 +272,6 @@ unsigned int CppCheck::processFile(const std::string& filename, const std::strin Timer t("Preprocessor::getcode", _settings.showtime, &S_timerResults); codeWithoutCfg = preprocessor.getcode(tokens1, cfg, files, true); } - codeWithoutCfg += _settings.append(); if (_settings.preprocessOnly) { if (codeWithoutCfg.compare(0,5,"#file") == 0) diff --git a/lib/settings.cpp b/lib/settings.cpp index eface7a01..600decb6a 100644 --- a/lib/settings.cpp +++ b/lib/settings.cpp @@ -129,22 +129,3 @@ bool Settings::isEnabled(Severity::SeverityType severity) const return false; } } - -bool Settings::append(const std::string &filename) -{ - std::ifstream fin(filename.c_str()); - if (!fin.is_open()) { - return false; - } - std::string line; - while (std::getline(fin, line)) { - _append += line + "\n"; - } - Preprocessor::preprocessWhitespaces(_append); - return true; -} - -const std::string &Settings::append() const -{ - return _append; -} diff --git a/lib/settings.h b/lib/settings.h index 9bae5e84e..13dba8703 100644 --- a/lib/settings.h +++ b/lib/settings.h @@ -56,9 +56,6 @@ public: }; private: - /** @brief Code to append in the checks */ - std::string _append; - /** @brief enable extra checks by id */ int _enabled; @@ -161,12 +158,6 @@ public: for finding include files inside source files. (-I) */ std::list includePaths; - /** @brief assign append code (--append) */ - bool append(const std::string &filename); - - /** @brief get append code (--append) */ - const std::string &append() const; - /** @brief Maximum number of configurations to check before bailing. Default is 12. (--max-configs=N) */ unsigned int maxConfigs;