diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 74f68c9fc..4e1c2ddb7 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -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 Start [jobs] threads to do the checking simultaneously.\n" " --language=, -x \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=\n" " Maximum number of configurations to check in a file\n" " before skipping it. Default is '12'. If used together\n" diff --git a/lib/settings.h b/lib/settings.h index 4ec6bd2b2..b13147f1d 100644 --- a/lib/settings.h +++ b/lib/settings.h @@ -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. */ diff --git a/test/testcmdlineparser.cpp b/test/testcmdlineparser.cpp index 05fc18b2e..f43a6b5b9 100644 --- a/test/testcmdlineparser.cpp +++ b/test/testcmdlineparser.cpp @@ -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;