16
16
// -top N show the top N most complex functions only
17
17
// -avg, -avg-short show the average complexity;
18
18
// the short option prints the value without a label
19
- // -total, -total-short show the total complexity;
20
- // the short option prints the value without a label
21
19
// -ignore REGEX exclude files matching the given regular expression
22
20
//
23
21
// The output fields for each line are:
44
42
-top N show the top N most complex functions only
45
43
-avg, -avg-short show the average complexity over all functions;
46
44
the short option prints the value without a label
47
- -total, -total-short show the total complexity for all functions;
48
- the short option prints the value without a label
49
45
-ignore REGEX exclude files matching the given regular expression
50
46
51
47
The output fields for each line are:
@@ -57,8 +53,6 @@ func main() {
57
53
top := flag .Int ("top" , - 1 , "show the top N most complex functions only" )
58
54
avg := flag .Bool ("avg" , false , "show the average complexity" )
59
55
avgShort := flag .Bool ("avg-short" , false , "show the average complexity without a label" )
60
- total := flag .Bool ("total" , false , "show the total complexity" )
61
- totalShort := flag .Bool ("total-short" , false , "show the total complexity without a label" )
62
56
ignore := flag .String ("ignore" , "" , "exclude files matching the given regular expression" )
63
57
64
58
log .SetFlags (0 )
@@ -77,9 +71,6 @@ func main() {
77
71
if * avg || * avgShort {
78
72
printAverage (allStats , * avgShort )
79
73
}
80
- if * total || * totalShort {
81
- printTotal (allStats , * totalShort )
82
- }
83
74
84
75
if * over > 0 && len (shownStats ) > 0 {
85
76
os .Exit (1 )
@@ -110,13 +101,6 @@ func printAverage(s gocyclo.Stats, short bool) {
110
101
fmt .Printf ("%.3g\n " , s .AverageComplexity ())
111
102
}
112
103
113
- func printTotal (s gocyclo.Stats , short bool ) {
114
- if ! short {
115
- fmt .Print ("Total: " )
116
- }
117
- fmt .Printf ("%d\n " , s .TotalComplexity ())
118
- }
119
-
120
104
func usage () {
121
105
_ , _ = fmt .Fprint (os .Stderr , usageDoc )
122
106
os .Exit (2 )
0 commit comments