-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathREADME
74 lines (54 loc) · 2.23 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
C metrics package
=================
INSTALL
-------
see INSTALL file
USAGE
-----
cmetrics [-h] [-f] [-p] [-n] target_dir
positional arguments:
target_dir directory with sources (recursively scanned)
optional arguments:
-h, --help show this help message and exit
-f, --functions show metrics for functions instead of files
-p, --path show full file path in the last column
-n, --no-header do not show metrics names in the first row
HOW TO INTERPRET THE OUTPUT OF CMETRICS
---------------------------------------
CMetrics measures size and complexity for C files. The metrics are the
following:
SLOC Source Lines of Code (text lines excluding blanks and
comments)
LOC Text lines in the source code file (including blanks, etc)
BLANK Number of blank lines
COM.L Number of lines that are exclusively comments (no code)
COM.N Number of comments in the file (a comment can be multiline)
H.LEN Halstead's Length
H.VOL Halstead's Volume
H.LEVEL Halstead's Level
H MEN.D Halstead's number of mental discriminations
MAXCY Maximum McCabe's cyclomatic complexity (between all the
functions)
MINCY Minimum McCabe's cyclomatic complexity
AVGCY Average McCabe's cyclomatic complexity
MEDCY Median McCabe's cyclomatic complexity
TOTCY Total McCabe's cyclomatic complexity (sum of all functions)
If you use the '-f' option, you will get info for functions instead of
files. If the function name is "***", it means that it is code outside
of the scope of functions but inside the file. The available metrics
are:
SLOC Source Lines of code
CYCLO McCabe's cyclomatic complexity
RETURN Number of exit points in the function
COPYRIGHT INFO
--------------
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.
See the COPYING file for details.
(c) 2007-2011 Israel Herraiz
Imported from the C Metrics package by Brian Renaud.
It has been "adopted" by Libresoft with permission of the original
author, and it is now part of the Libresoft-tools project.
Check https://github.com/MetricsGrimoire/CMetrics for details