| 1 |
:Version: 2.3.1 |
| 2 |
:Copyright: 2012-2017 Michele Lacchia |
| 3 |
:Title: radon |
| 4 |
:subtitle: Python tool to compute code metrics |
| 5 |
:Manual section: "1" |
| 6 |
|
| 7 |
Description |
| 8 |
============ |
| 9 |
|
| 10 |
``radon`` is a Python tool which computes various code metrics. |
| 11 |
|
| 12 |
Summary |
| 13 |
####### |
| 14 |
|
| 15 |
Radon is a Python tool which computes various code metrics. Supported metrics are: |
| 16 |
|
| 17 |
* raw metrics: SLOC, comment lines, blank lines, etc. |
| 18 |
* Cyclomatic Complexity (i.e. McCabe's Complexity) |
| 19 |
* Halstead metrics (all of them) |
| 20 |
* the Maintainability Index (a Visual Studio metric) |
| 21 |
|
| 22 |
Radon can be used either from the command line or programmatically through its API. |
| 23 |
|
| 24 |
Usage |
| 25 |
##### |
| 26 |
|
| 27 |
radon [-h] [-v] {cc,raw,mi,hal} ... |
| 28 |
|
| 29 |
positional arguments |
| 30 |
#################### |
| 31 |
|
| 32 |
{cc,raw,mi,hal} |
| 33 |
|
| 34 |
cc Analyze the given Python modules and compute Cyclomatic Complexity (CC). |
| 35 |
|
| 36 |
raw Analyze the given Python modules and compute raw metrics. |
| 37 |
|
| 38 |
mi Analyze the given Python modules and compute the Maintainability Index. |
| 39 |
|
| 40 |
hal Analyze the given Python modules and compute their Halstead metrics. |
| 41 |
|
| 42 |
optional arguments |
| 43 |
################## |
| 44 |
|
| 45 |
-h, --help show this help message and exit |
| 46 |
-v, --version show program's version number and exit |
| 47 |
|
| 48 |
Links |
| 49 |
##### |
| 50 |
|
| 51 |
https://dzone.com/articles/what-exactly-is-mccabe-cyclomatic-complexity |
| 52 |
|
| 53 |
Cyclomatic Complexity can be seen simply as the number of independent paths that exist between the input of the function and its output |
| 54 |
|
| 55 |
``radon`` output consists of columns. The first column indicates ``F M C`` - or ``function`` ``method`` ``class``. |
| 56 |
|
| 57 |
Use --exclude ``"*/filename.py"`` to skip a particular file(s) |