if (_settings->isEnabled("unusedFunction") && _settings->_jobs > 1) {
PrintMessage("cppcheck: unusedFunction check can't be used with '-j' option. Disabling unusedFunction check.");
}
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. It's recommended to use the new xml format (use --xml-version=2).");
}
if (argc <= 1) {
_showHelp = true;
_exitAfterPrint = true;
}
if (_showHelp) {
PrintHelp();
returntrue;
}
// Print error only if we have "real" command and expect files
if (!_exitAfterPrint && _pathnames.empty()) {
PrintMessage("cppcheck: No C or C++ source files found.");
returnfalse;
}
// Use paths _pathnames if no base paths for relative path output are given
if (_settings->_basePaths.empty() && _settings->_relativePaths)
_settings->_basePaths = _pathnames;
returntrue;
}
voidCmdLineParser::PrintHelp()
{
std::cout << "Cppcheck - A tool for static C/C++ code analysis\n"
"\n"
"Syntax:\n"
" cppcheck [OPTIONS] [files or paths]\n"
"\n"
"If a directory is given instead of a filename, *.cpp, *.cxx, *.cc, *.c++, *.c,\n"
"*.tpp, and *.txx files are checked recursively from the given directory.\n\n"
"Options:\n"
" --append=<file> This allows you to provide information about functions\n"
" by providing an implementation for them.\n"
" --check-config Check cppcheck configuration. The normal code\n"
" analysis is disabled by this flag.\n"
" --check-library Show information messages when library files have\n"
" incomplete info.\n"
" --dump Dump xml data for each translation unit. The dump\n"
" files have the extension .dump and contain ast,\n"