Removed deprecated cmdline options -s, --style, -a, --all, --auto-dealloc, --test-2-pass

This commit is contained in:
PKEuS 2012-04-15 13:10:41 +02:00
parent 4c79a1af20
commit a420a36606
4 changed files with 0 additions and 50 deletions

View File

@ -121,28 +121,10 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
else if (strcmp(argv[i], "--debug-fp") == 0)
_settings->debugFalsePositive = true;
// Enable all checks - will be removed in future
else if (strcmp(argv[i], "-a") == 0 || strcmp(argv[i], "--all") == 0) {
PrintMessage("cppcheck: '-a/--all' option is deprecated and will be removed in 1.55 release.");
PrintMessage("cppcheck: please use '--enable=all' instead.");
}
// Inconclusive checking (still in testing phase)
else if (strcmp(argv[i], "--inconclusive") == 0)
_settings->inconclusive = true;
// Checking coding style - will be removed in the future
else if (strcmp(argv[i], "-s") == 0 || strcmp(argv[i], "--style") == 0) {
PrintMessage("cppcheck: '-s/--style' option is deprecated and will be removed in 1.55 release.");
PrintMessage("cppcheck: please use '--enable=style' instead.");
const std::string errmsg = _settings->addEnabled("style");
if (!errmsg.empty()) {
PrintMessage(errmsg);
return false;
}
}
// Filter errors
else if (strncmp(argv[i], "--exitcode-suppressions", 23) == 0) {
std::string filename;
@ -518,12 +500,6 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
}
}
// deprecated: auto deallocated classes..
else if (strcmp(argv[i], "--auto-dealloc") == 0) {
++i;
PrintMessage("cppcheck: '--auto-dealloc' option is deprecated and will be removed in 1.55 release.");
}
// print all possible error messages..
else if (strcmp(argv[i], "--errorlist") == 0) {
_showErrorMessages = true;
@ -551,12 +527,6 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
return true;
}
// --test-2-pass Experimental 2-pass checking of files
// This command line flag will be removed
else if (strcmp(argv[i], "--test-2-pass") == 0) {
_settings->test_2_pass = true;
}
// show timing information..
else if (strncmp(argv[i], "--showtime=", 11) == 0) {
const std::string showtimeMode = argv[i] + 11;
@ -684,11 +654,6 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
PrintMessage("cppcheck: unusedFunction check can't be used with '-j' option, so it's disabled.");
}
// FIXME: Make the _settings.test_2_pass thread safe
if (_settings->test_2_pass && _settings->_jobs > 1) {
PrintMessage("cppcheck: --test-2-pass doesn't work with -j option yet.");
}
if (argc <= 1)
_showHelp = true;
@ -818,7 +783,6 @@ void CmdLineParser::PrintHelp() const
" --rule-file=<file> Use given rule file. For more information, see: \n"
" https://sourceforge.net/projects/cppcheck/files/Articles/\n"
#endif
" -s, --style Deprecated, please use '--enable=style' instead\n"
" --std=<id> Enable some standard related checks.\n"
" The available options are:\n"
" * posix\n"

View File

@ -138,16 +138,6 @@ unsigned int CppCheck::processFile(const std::string& filename)
if (!Path::acceptFile(filename))
_settings.debugwarnings = false;
// TODO: Should this be moved out to its own function so all the files can be
// analysed before any files are checked?
if (_settings.test_2_pass && _settings._jobs == 1) {
const std::string printname = Path::toNativeSeparators(filename);
reportOut("Analysing " + printname + "...");
std::ifstream f(filename.c_str());
analyseFile(f, filename);
}
if (_settings.terminated())
return exitcode;

View File

@ -37,7 +37,6 @@ Settings::Settings()
_exitCode(0),
_showtime(0),
_maxConfigs(12),
test_2_pass(false),
reportProgress(false),
checkConfiguration(false)
{

View File

@ -160,9 +160,6 @@ public:
/** @brief undefines given by the user */
std::set<std::string> userUndefs;
/** @brief Experimental 2 pass checking of files */
bool test_2_pass;
/** @brief --report-progress */
bool reportProgress;