Files
codeql/cpp/ql/src/Documentation/UncommentedFunction.qhelp
2018-08-02 17:53:23 +01:00

35 lines
993 B
XML

<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<p>
This rule finds large functions that have too few comment lines. Documentation becomes more important as a function becomes more
complex, and a lack of documentation makes it harder to maintain.
</p>
</overview>
<recommendation>
<p>
Add comments to document the purpose of the function. Large, complex functions in particular require detailed documentation, not only
because they are harder to understand, but the process of documentation may reveal that the function could be split into smaller, more
cohesive functions.
</p>
</recommendation>
<references>
<li>
<a href="http://en.wikibooks.org/wiki/C%2B%2B_Programming/Programming_Languages/C%2B%2B/Code/Style_Conventions#Comments">C++ Programming, Coding style conventions</a>
</li>
<li>
<a href="http://en.wikipedia.org/wiki/Comment_%28computer_programming%29#Need_for_comments">Wikipedia: Need for comments</a>
</li>
</references>
</qhelp>