renamed --check-includes to --check-config

This commit is contained in:
Daniel Marjamäki 2011-05-02 21:28:33 +02:00
parent aa85866bc0
commit d998477c69
6 changed files with 12 additions and 19 deletions

View File

@ -575,9 +575,9 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
#endif
// Check configuration
else if (strcmp(argv[i], "--check-includes") == 0)
else if (strcmp(argv[i], "--check-config") == 0)
{
_settings->checkIncludes = true;
_settings->checkConfiguration = true;
}
// Print help
@ -648,9 +648,8 @@ void CmdLineParser::PrintHelp()
"Options:\n"
" --append=<file> This allows you to provide information about\n"
" functions by providing an implementation for these.\n"
" --check-includes Check for missing includes. This option is used to\n"
" determine if the cppcheck configuration is ok. No\n"
" code analysis is done during this check.\n"
" --check-config Check cppcheck configuration. The normal code\n"
" analysis is disabled by this flag.\n"
" -D<ID> By default Cppcheck checks all configurations.\n"
" Use -D to limit the checking. When -D is used the\n"
" checking is limited to the given configuration.\n"
@ -666,7 +665,7 @@ void CmdLineParser::PrintHelp()
" Check for unused functions\n"
" * missingInclude\n"
" Warn if there are missing includes.\n"
" See also: --check-includes\n"
" For detailed information use --check-config\n"
" Several ids can be given if you separate them with\n"
" commas.\n"
" --error-exitcode=<n> If errors are found, integer [n] is returned instead\n"

View File

@ -185,7 +185,7 @@ int CppCheckExecutor::check(int argc, const char* const argv[])
returnValue = executor.check();
}
if (!cppCheck.settings().checkConfiguration())
if (!cppCheck.settings().checkConfiguration)
{
reportUnmatchedSuppressions(cppCheck.settings().nomsg.getUnmatchedGlobalSuppressions());

View File

@ -122,7 +122,7 @@ unsigned int CppCheck::processFile()
preprocessor.preprocess(fin, filedata, configurations, _filename, _settings._includePaths);
}
if (_settings.checkConfiguration())
if (_settings.checkConfiguration)
{
return 0;
}
@ -217,7 +217,7 @@ void CppCheck::analyseFile(std::istream &fin, const std::string &filename)
preprocessor.preprocess(fin, filedata, configurations, filename, _settings._includePaths);
const std::string code = Preprocessor::getcode(filedata, "", filename, &_settings, &_errorLogger);
if (_settings.checkConfiguration())
if (_settings.checkConfiguration)
{
return;
}
@ -250,7 +250,7 @@ void CppCheck::analyseFile(std::istream &fin, const std::string &filename)
void CppCheck::checkFile(const std::string &code, const char FileName[])
{
if (_settings.terminated() || _settings.checkConfiguration())
if (_settings.terminated() || _settings.checkConfiguration)
return;
Tokenizer _tokenizer(&_settings, this);

View File

@ -1936,7 +1936,7 @@ void Preprocessor::handleIncludes(std::string &code, const std::string &filePath
if (_errorLogger &&
_settings &&
_settings->checkIncludes &&
_settings->checkConfiguration &&
(headerType == UserHeader || _settings->debugwarnings))
{
std::string f = filePath;

View File

@ -47,7 +47,7 @@ Settings::Settings()
test_2_pass = false;
reportProgress = false;
ifcfg = false;
checkIncludes = false;
checkConfiguration = false;
}
std::string Settings::Suppressions::parseFile(std::istream &istr)

View File

@ -302,13 +302,7 @@ public:
std::list<Rule> rules;
/** Is the 'configuration checking' wanted? */
bool checkConfiguration() const
{
return checkIncludes;
}
/** Check configuration: includes */
bool checkIncludes;
bool checkConfiguration;
};
/// @}