-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathCLinesOfComment.qhelp
More file actions
24 lines (20 loc) · 1.07 KB
/
CLinesOfComment.qhelp
File metadata and controls
24 lines (20 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<p>This metric measures the (absolute) number of comment lines per method. The value of this metric
should be considered in the context of the complexity of the method: a simple method with little
documentation may be fine but a more complex method may be difficult to understand and maintain.</p>
</overview>
<recommendation>
<p>Consider if the method needs more documentation. Simple methods might not but most methods should have at least a
comment explaining their purpose. If the method is particularly long and complicated it might be a good idea to
extract parts of it into different methods. If these methods are given meaningful names then readability will be
increased without the need for more comments.</p>
</recommendation>
<references>
<li>Jeff Atwood. <a href="http://www.codinghorror.com/blog/2005/11/avoiding-undocumentation.html">Avoiding Undocumentation</a>. 2005.</li>
<li>Steve McConnell. <em>Code Complete</em>. 2nd Edition. Microsoft Press. 2004.</li>
</references>
</qhelp>