30 lines
642 B
Plaintext
30 lines
642 B
Plaintext
This rule allows you to check for certain types of comments before each method. For example, you may want to check for a Doxygen @author comment before each method.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
With regular expression: ``++//! @brief[ \t]+[a-zA-Z ]+++``:
|
|
|
|
[source,text]
|
|
----
|
|
bool TEST_CLASS_OK::Method(int nArg) // Noncompliant
|
|
{
|
|
return true;
|
|
}{code}
|
|
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
[source,text]
|
|
----
|
|
//-------------------------------------------------------------------------
|
|
//! @brief Method
|
|
//-------------------------------------------------------------------------
|
|
bool TEST_CLASS_OK::Method(int nArg)
|
|
{
|
|
return true;
|
|
}
|
|
----
|
|
|