Reformatting the --doc output to work better in the wiki
This commit is contained in:
parent
3e698362c4
commit
25bf50755e
|
@ -87,8 +87,8 @@ private:
|
|||
{
|
||||
return "A pointer to a variable is only valid as long as the variable is in scope.\n"
|
||||
"Check:\n"
|
||||
" * returning a pointer to variable\n"
|
||||
" * assigning address of an variable to an effective parameter of a function\n";
|
||||
"* returning a pointer to variable\n"
|
||||
"* assigning address of an variable to an effective parameter of a function\n";
|
||||
}
|
||||
};
|
||||
/// @}
|
||||
|
|
|
@ -153,12 +153,12 @@ private:
|
|||
std::string classInfo() const
|
||||
{
|
||||
return "Check the code for each class.\n"
|
||||
" * Missing constructors\n"
|
||||
" * Are all variables initialized by the constructors?\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"
|
||||
" * The operator= should return a constant reference to itself\n"
|
||||
" * Are there unused private functions\n";
|
||||
"* Missing constructors\n"
|
||||
"* Are all variables initialized by the constructors?\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"
|
||||
"* The operator= should return a constant reference to itself\n"
|
||||
"* Are there unused private functions\n";
|
||||
}
|
||||
};
|
||||
/// @}
|
||||
|
|
|
@ -72,9 +72,9 @@ private:
|
|||
std::string classInfo() const
|
||||
{
|
||||
return "Warn if any of these deprecated functions are used:\n"
|
||||
" * mktemp\n"
|
||||
" * gets\n"
|
||||
" * scanf\n";
|
||||
"* mktemp\n"
|
||||
"* gets\n"
|
||||
"* scanf\n";
|
||||
}
|
||||
};
|
||||
/// @}
|
||||
|
|
|
@ -104,10 +104,10 @@ private:
|
|||
std::string classInfo() const
|
||||
{
|
||||
return "Checking exception safety\n"
|
||||
" * Throwing exceptions in destructors\n"
|
||||
" * Unsafe use of 'new'\n"
|
||||
" * Unsafe reallocation\n"
|
||||
" * Throwing exception during invalid state";
|
||||
"* Throwing exceptions in destructors\n"
|
||||
"* Unsafe use of 'new'\n"
|
||||
"* Unsafe reallocation\n"
|
||||
"* Throwing exception during invalid state";
|
||||
}
|
||||
};
|
||||
/// @}
|
||||
|
|
|
@ -199,26 +199,26 @@ public:
|
|||
return "Other checks\n"
|
||||
|
||||
// error
|
||||
" * [[OverlappingData|bad usage of the function 'sprintf' (overlapping data)]]\n"
|
||||
" * division with zero\n"
|
||||
" * null pointer dereferencing\n"
|
||||
" * using uninitialized variables and data\n"
|
||||
"* [[OverlappingData|bad usage of the function 'sprintf' (overlapping data)]]\n"
|
||||
"* division with zero\n"
|
||||
"* null pointer dereferencing\n"
|
||||
"* using uninitialized variables and data\n"
|
||||
|
||||
// style
|
||||
" * C-style pointer cast in cpp file\n"
|
||||
" * redundant if\n"
|
||||
" * bad usage of the function 'strtol'\n"
|
||||
" * [[CheckUnsignedDivision|unsigned division]]\n"
|
||||
" * unused struct member\n"
|
||||
" * passing parameter by value\n"
|
||||
" * [[IncompleteStatement|Incomplete statement]]\n"
|
||||
" * [[charvar|check how signed char variables are used]]\n"
|
||||
" * variable scope can be limited\n"
|
||||
" * condition that is always true/false\n"
|
||||
" * unusal pointer arithmetic. For example: \"abc\" + 'd'\n"
|
||||
"* C-style pointer cast in cpp file\n"
|
||||
"* redundant if\n"
|
||||
"* bad usage of the function 'strtol'\n"
|
||||
"* [[CheckUnsignedDivision|unsigned division]]\n"
|
||||
"* unused struct member\n"
|
||||
"* passing parameter by value\n"
|
||||
"* [[IncompleteStatement|Incomplete statement]]\n"
|
||||
"* [[charvar|check how signed char variables are used]]\n"
|
||||
"* variable scope can be limited\n"
|
||||
"* condition that is always true/false\n"
|
||||
"* unusal pointer arithmetic. For example: \"abc\" + 'd'\n"
|
||||
|
||||
// optimisations
|
||||
" * optimisation: detect post increment/decrement\n";
|
||||
"* optimisation: detect post increment/decrement\n";
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -149,13 +149,13 @@ private:
|
|||
std::string classInfo() const
|
||||
{
|
||||
return "Check for invalid usage of STL:\n"
|
||||
" * out of bounds errors\n"
|
||||
" * misuse of iterators when iterating through a container\n"
|
||||
" * mismatching containers in calls\n"
|
||||
" * dereferencing an erased iterator\n"
|
||||
" * for vectors: using iterator/pointer after push_back has been used\n"
|
||||
" * dangerous usage of find\n"
|
||||
" * optimisation: using empty() instead of size()";
|
||||
"* out of bounds errors\n"
|
||||
"* misuse of iterators when iterating through a container\n"
|
||||
"* mismatching containers in calls\n"
|
||||
"* dereferencing an erased iterator\n"
|
||||
"* for vectors: using iterator/pointer after push_back has been used\n"
|
||||
"* dangerous usage of find\n"
|
||||
"* optimisation: using empty() instead of size()";
|
||||
}
|
||||
|
||||
bool isStlContainer(const Token *tok);
|
||||
|
|
Loading…
Reference in New Issue