Files
codeql/python/ql/src/Metrics/FFunctionsAndMethods.qhelp
2018-11-19 15:10:42 +00:00

28 lines
1011 B
XML

<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<p>This metric measures the number of functions and methods 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>Python: <a href="http://docs.python.org/2/reference/compound_stmts.html#function">Function Definitions</a>.</li>
<li>M. Fowler, <em>Refactoring</em>. Addison-Wesley, 1999.</li>
<li>Wikipedia: <a href="https://en.wikipedia.org/wiki/Code_refactoring">Code refactoring</a>.</li>
</references>
</qhelp>