Reformatting the --doc output to work better in the wiki

This commit is contained in:
Daniel Marjamäki 2010-01-17 14:56:56 +01:00
parent 3e698362c4
commit 25bf50755e
6 changed files with 38 additions and 38 deletions

View File

@ -87,8 +87,8 @@ private:
{ {
return "A pointer to a variable is only valid as long as the variable is in scope.\n" return "A pointer to a variable is only valid as long as the variable is in scope.\n"
"Check:\n" "Check:\n"
" * returning a pointer to variable\n" "* returning a pointer to variable\n"
" * assigning address of an variable to an effective parameter of a function\n"; "* assigning address of an variable to an effective parameter of a function\n";
} }
}; };
/// @} /// @}

View File

@ -153,12 +153,12 @@ private:
std::string classInfo() const std::string classInfo() const
{ {
return "Check the code for each class.\n" return "Check the code for each class.\n"
" * Missing constructors\n" "* Missing constructors\n"
" * Are all variables initialized by the constructors?\n" "* Are all variables initialized by the constructors?\n"
" * [[CheckMemset|Warn if memset, memcpy etc are used on a class]]\n" "* [[CheckMemset|Warn if memset, memcpy etc are used on a class]]\n"
" * If it's a base class, check that the destructor is virtual\n" "* If it's a base class, check that the destructor is virtual\n"
" * The operator= should return a constant reference to itself\n" "* The operator= should return a constant reference to itself\n"
" * Are there unused private functions\n"; "* Are there unused private functions\n";
} }
}; };
/// @} /// @}

View File

@ -72,9 +72,9 @@ private:
std::string classInfo() const std::string classInfo() const
{ {
return "Warn if any of these deprecated functions are used:\n" return "Warn if any of these deprecated functions are used:\n"
" * mktemp\n" "* mktemp\n"
" * gets\n" "* gets\n"
" * scanf\n"; "* scanf\n";
} }
}; };
/// @} /// @}

View File

@ -104,10 +104,10 @@ private:
std::string classInfo() const std::string classInfo() const
{ {
return "Checking exception safety\n" return "Checking exception safety\n"
" * Throwing exceptions in destructors\n" "* Throwing exceptions in destructors\n"
" * Unsafe use of 'new'\n" "* Unsafe use of 'new'\n"
" * Unsafe reallocation\n" "* Unsafe reallocation\n"
" * Throwing exception during invalid state"; "* Throwing exception during invalid state";
} }
}; };
/// @} /// @}

View File

@ -199,26 +199,26 @@ public:
return "Other checks\n" return "Other checks\n"
// error // error
" * [[OverlappingData|bad usage of the function 'sprintf' (overlapping data)]]\n" "* [[OverlappingData|bad usage of the function 'sprintf' (overlapping data)]]\n"
" * division with zero\n" "* division with zero\n"
" * null pointer dereferencing\n" "* null pointer dereferencing\n"
" * using uninitialized variables and data\n" "* using uninitialized variables and data\n"
// style // style
" * C-style pointer cast in cpp file\n" "* C-style pointer cast in cpp file\n"
" * redundant if\n" "* redundant if\n"
" * bad usage of the function 'strtol'\n" "* bad usage of the function 'strtol'\n"
" * [[CheckUnsignedDivision|unsigned division]]\n" "* [[CheckUnsignedDivision|unsigned division]]\n"
" * unused struct member\n" "* unused struct member\n"
" * passing parameter by value\n" "* passing parameter by value\n"
" * [[IncompleteStatement|Incomplete statement]]\n" "* [[IncompleteStatement|Incomplete statement]]\n"
" * [[charvar|check how signed char variables are used]]\n" "* [[charvar|check how signed char variables are used]]\n"
" * variable scope can be limited\n" "* variable scope can be limited\n"
" * condition that is always true/false\n" "* condition that is always true/false\n"
" * unusal pointer arithmetic. For example: \"abc\" + 'd'\n" "* unusal pointer arithmetic. For example: \"abc\" + 'd'\n"
// optimisations // optimisations
" * optimisation: detect post increment/decrement\n"; "* optimisation: detect post increment/decrement\n";
} }
private: private:

View File

@ -149,13 +149,13 @@ private:
std::string classInfo() const std::string classInfo() const
{ {
return "Check for invalid usage of STL:\n" return "Check for invalid usage of STL:\n"
" * out of bounds errors\n" "* out of bounds errors\n"
" * misuse of iterators when iterating through a container\n" "* misuse of iterators when iterating through a container\n"
" * mismatching containers in calls\n" "* mismatching containers in calls\n"
" * dereferencing an erased iterator\n" "* dereferencing an erased iterator\n"
" * for vectors: using iterator/pointer after push_back has been used\n" "* for vectors: using iterator/pointer after push_back has been used\n"
" * dangerous usage of find\n" "* dangerous usage of find\n"
" * optimisation: using empty() instead of size()"; "* optimisation: using empty() instead of size()";
} }
bool isStlContainer(const Token *tok); bool isStlContainer(const Token *tok);