rspec/rules/S1888/rule.adoc
2022-02-04 16:28:24 +00:00

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;
}
----