command line: added 'information' id to enable
This commit is contained in:
parent
21af64049c
commit
033e759c39
|
@ -512,6 +512,7 @@ void CmdLineParser::PrintHelp()
|
|||
" --enable=id Enable additional checks. The available ids are:\n"
|
||||
" * all - enable all checks\n"
|
||||
" * style - Check coding style\n"
|
||||
" * information - Enable information messages\n"
|
||||
" * unusedFunction - check for unused functions\n"
|
||||
" * missingInclude - check for missing includes\n"
|
||||
" Several ids can be given if you separate them with commas\n"
|
||||
|
|
|
@ -891,7 +891,7 @@ void CheckClass::thisSubtractionError(const Token *tok)
|
|||
|
||||
void CheckClass::checkConst()
|
||||
{
|
||||
if (!_settings->_checkCodingStyle || _settings->ifcfg)
|
||||
if (!_settings->isEnabled("information") || _settings->ifcfg)
|
||||
return;
|
||||
|
||||
// Don't check C# and JAVA classes
|
||||
|
|
|
@ -1887,7 +1887,7 @@ void CheckOther::unassignedVariableError(const Token *tok, const std::string &va
|
|||
|
||||
void CheckOther::checkVariableScope()
|
||||
{
|
||||
if (!_settings->_checkCodingStyle)
|
||||
if (!_settings->isEnabled("information"))
|
||||
return;
|
||||
|
||||
SymbolDatabase *symbolDatabase = _tokenizer->getSymbolDatabase();
|
||||
|
|
|
@ -195,6 +195,7 @@ std::string Settings::addEnabled(const std::string &str)
|
|||
std::set<std::string> id;
|
||||
id.insert("missingInclude");
|
||||
id.insert("unusedFunction");
|
||||
id.insert("information");
|
||||
|
||||
if (str == "all")
|
||||
{
|
||||
|
|
|
@ -2929,7 +2929,7 @@ private:
|
|||
if (s)
|
||||
settings = *s;
|
||||
else
|
||||
settings._checkCodingStyle = true;
|
||||
settings.addEnabled("information");
|
||||
|
||||
// Tokenize..
|
||||
Tokenizer tokenizer(&settings, this);
|
||||
|
@ -5218,7 +5218,7 @@ private:
|
|||
"};";
|
||||
|
||||
Settings settings;
|
||||
settings._checkCodingStyle = true;
|
||||
settings.addEnabled("information");
|
||||
|
||||
settings.ifcfg = false;
|
||||
checkConst(code, &settings);
|
||||
|
|
|
@ -378,7 +378,7 @@ private:
|
|||
errout.str("");
|
||||
|
||||
Settings settings;
|
||||
settings._checkCodingStyle = true;
|
||||
settings.addEnabled("information");
|
||||
|
||||
// Tokenize..
|
||||
Tokenizer tokenizer(&settings, this);
|
||||
|
|
Loading…
Reference in New Issue