forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUncommentedFunction.qhelp
More file actions
34 lines (26 loc) · 993 Bytes
/
UncommentedFunction.qhelp
File metadata and controls
34 lines (26 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!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>