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