@@ -108,31 +108,43 @@ def find(self, srpmname):
108
108
result .append (status )
109
109
return result
110
110
111
- def summary (self ):
111
+ def print_summary (self ):
112
+ global total
112
113
num_bugs = 0
113
114
fixmes = 0
114
115
others = 0
116
+ cplusplus = 0
117
+ swig = 0
118
+ cython = 0
115
119
for status in self .statuses :
116
120
if isinstance (status , BugReport ):
117
121
num_bugs += 1
118
122
elif isinstance (status , Unreported ):
119
123
if 'FIXME' in status .notes or 'TODO' in status .notes :
120
- fixmes += 1
124
+ if 'C++' in status .notes :
125
+ cplusplus += 1
126
+ elif 'SWIG' in status .notes :
127
+ swig += 1
128
+ elif 'Cython' in status .notes :
129
+ cython += 1
130
+ else :
131
+ fixmes += 1
121
132
else :
122
133
others += 1
123
134
num_src_rpms = len (glob .glob ('SRPMS/*.src.rpm' ))
124
- return num_bugs , fixmes , others , num_src_rpms
125
-
126
- def print_summary (self ):
127
- num_bugs , fixmes , others , num_src_rpms = self .summary ()
135
+ total = 0
128
136
def print_amount (desc , count ):
137
+ global total
129
138
print ('* %i %s (%i%%)'
130
139
% (count , desc , count * 100 / num_src_rpms ))
140
+ total += count
131
141
print_amount ('bugs filed for src.rpms, where the checker found genuine problems' , num_bugs )
132
142
print_amount ('src.rpms not requiring a bug to be filed' , others )
133
- print_amount ('src.rpms requiring followup work' , fixmes )
134
- print_amount ('src.rpms not yet processed' ,
135
- num_src_rpms - (num_bugs + fixmes + others ))
143
+ print_amount ('src.rpms waiting on fix for C++ support' , cplusplus )
144
+ print_amount ('src.rpms waiting on better SWIG support' , swig )
145
+ print_amount ('src.rpms waiting on better Cython support' , cython )
146
+ print_amount ('src.rpms requiring other followup work' , fixmes )
147
+ print_amount ('src.rpms not accounted for' , num_src_rpms - total )
136
148
print ('out of %i total src.rpms (that link against libpython2.7)'
137
149
% num_src_rpms )
138
150
0 commit comments