Files
codeql/javascript/ql/src/Metrics/FCommentRatioCommon.inc.qhelp
2021-03-03 15:38:08 +01:00

39 lines
780 B
XML

<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<p>
This metric measures the percentage of a file's lines that are comment rather
than code.
</p>
<p>
A low percentage of comments in a file may indicate either a potentially
worrying lack of documentation or that the file was generated by an automated
tool. A quick visual inspection should be sufficient to distinguish between
the two cases.
</p>
</overview>
<recommendation>
<p>
Files that were not auto-generated and have a low comment percentage should
be documented more fully. Refer to [McConnell] for more on how to write good
comments.
</p>
</recommendation>
<references>
<li>
S. McConnell. <em>Code Complete</em>, 2nd Edition. Microsoft Press, 2004.
</li>
</references>
</qhelp>