Only warn about XML 1 if XML output is desired.

This commit is contained in:
Matthias Krüger 2016-08-07 15:37:06 +02:00
parent ec4a85ecef
commit 45e600f71c
1 changed files with 7 additions and 5 deletions

View File

@ -747,11 +747,13 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
PrintMessage("cppcheck: unusedFunction check can't be used with '-j' option. Disabling unusedFunction check.");
}
// Warn about XML format 1, which will be removed in cppcheck 1.81
if (_settings->xml_version == 1U)
PrintMessage("cppcheck: XML format version 1 is deprecated and will be removed in cppcheck 1.81. Use '--xml-version=2'.");
if (_settings->inconclusive && _settings->xml && _settings->xml_version == 1U)
PrintMessage("cppcheck: inconclusive messages will not be shown, because the old xml format is not compatible.");
if (_settings->xml) {
// Warn about XML format 1, which will be removed in cppcheck 1.81
if (_settings->xml_version == 1U)
PrintMessage("cppcheck: XML format version 1 is deprecated and will be removed in cppcheck 1.81. Use '--xml-version=2'.");
if (_settings->inconclusive && _settings->xml_version == 1U)
PrintMessage("cppcheck: inconclusive messages will not be shown, because the old xml format is not compatible.");
}
if (argc <= 1) {
_showHelp = true;