--doc : don't write internal checks in the doc output

This commit is contained in:
Daniel Marjamäki 2011-12-10 18:39:25 +01:00
parent caa45f549d
commit c5a1b5ecab
2 changed files with 8 additions and 6 deletions

View File

@ -513,8 +513,11 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
std::ostringstream doc;
// Get documentation..
for (std::list<Check *>::iterator it = Check::instances().begin(); it != Check::instances().end(); ++it) {
doc << "===" << (*it)->name() << "===\n"
<< (*it)->classInfo() << "\n\n";
const std::string name((*it)->name());
const std::string info((*it)->classInfo());
if (!name.empty() && !info.empty())
doc << "===" << name << "===\n"
<< info << "\n\n";
}
std::string doc2(doc.str());

View File

@ -80,10 +80,9 @@ private:
}
std::string classInfo() const {
return "Check for wrong or unsuitable internal API usage:\n"
"* Found simple pattern inside Token::Match() call: \"class {\"\n"
"* Found complex pattern inside Token::simpleMatch() call: \"%type%\"\n"
"* Missing percent end character in Token::Match pattern: \"%num\"\n";
// Don't include these checks on the WIKI where people can read what
// checks there are. These checks are not intended for users.
return "";
}
};
/// @}