cleanup more java/c# code. Thanks amai for telling me about this.

This commit is contained in:
Daniel Marjamäki 2012-10-03 19:19:49 +02:00
parent 2f069f550f
commit 1e024a9abc
3 changed files with 2 additions and 20 deletions

View File

@ -143,10 +143,6 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
_settings->enforcedLang = Settings::C;
else if (str == "c++")
_settings->enforcedLang = Settings::CPP;
else if (str == "c#")
_settings->enforcedLang = Settings::CSharp;
else if (str == "java")
_settings->enforcedLang = Settings::Java;
else {
PrintMessage("cppcheck: Unknown language '" + str + "' enforced.");
return false;
@ -791,7 +787,7 @@ void CmdLineParser::PrintHelp()
" -j <jobs> Start [jobs] threads to do the checking simultaneously.\n"
" --language=<language>, -x <language>\n"
" Forces cppcheck to check all files as the given\n"
" language. Valid values are: c, c++, java, c#\n"
" language. Valid values are: c, c++\n"
" --max-configs=<limit>\n"
" Maximum number of configurations to check in a file\n"
" before skipping it. Default is '12'. If used together\n"

View File

@ -150,7 +150,7 @@ public:
std::string addEnabled(const std::string &str);
enum Language {
None, C, CPP, CSharp, Java
None, C, CPP
};
/** @brief Name of the language that is enforced. Empty per default. */

View File

@ -410,20 +410,6 @@ private:
ASSERT(parser.ParseFromArgs(3, argv));
ASSERT_EQUALS(Settings::C, settings.enforcedLang);
}
{
const char *argv[] = {"cppcheck", "--language=c#", "file.cpp"};
Settings settings;
CmdLineParser parser(&settings);
ASSERT(parser.ParseFromArgs(3, argv));
ASSERT_EQUALS(Settings::CSharp, settings.enforcedLang);
}
{
const char *argv[] = {"cppcheck", "--language=java", "file.cpp"};
Settings settings;
CmdLineParser parser(&settings);
ASSERT(parser.ParseFromArgs(3, argv));
ASSERT_EQUALS(Settings::Java, settings.enforcedLang);
}
{
const char *argv[] = {"cppcheck", "--language=unknwonLanguage", "file.cpp"};
Settings settings;