Files
codeql/cpp/ql/src/Metrics/Files/NumberOfFunctions.qhelp
2018-08-10 08:40:22 +01:00

39 lines
1.1 KiB
XML

<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<p>This metric measures the number of functions defined in each file.</p>
<p>Tracking this metric over time will indicate which parts of the system are under active
development. Cross-referencing with the other metrics "Cyclomatic Complexity" and "Lines of
Code" is recommended, because files with high values for all three metrics are very likely
to be too big and unwieldy; such files should be split up.</p>
</overview>
<recommendation>
<p>If a file is too big, identify the different tasks that are carried out by its functions
and split the file according to these tasks.</p>
</recommendation>
<references>
<li>
<a href="http://www.cplusplus.com/doc/tutorial/functions/">Functions</a>
</li>
<li>
M. Fowler. <em>Refactoring</em>. Addison-Wesley, 1999.
</li>
<li>
<a href="https://en.wikipedia.org/wiki/Code_refactoring">Wikipedia: Code refactoring</a>
</li>
<li>
<a href="http://www.jot.fm/issues/issue_2005_01/column1/">Refactoring as Meta Programming?</a>
</li>
</references>
</qhelp>