nitc :: BadConception :: print_result
# Show results in console
fun print_result is abstract
src/metrics/codesmells_metrics.nit:180,2--181,29
redef fun print_result do
print phase.toolcontext.format_h2("{desc}: {number_attribut} attributes and {number_method} methods ({phase.average_number_of_attribute}A {phase.average_number_of_method}M Average)")
end
src/metrics/codesmells_metrics.nit:207,2--209,4
redef fun print_result do
print phase.toolcontext.format_h2("{desc}:")
if self.bad_methods.not_empty then
print " Affected method(s):"
for method in self.bad_methods do
print " -{method.name} has {method.msignature.mparameters.length} parameters"
end
end
end
src/metrics/codesmells_metrics.nit:240,2--248,4
redef fun print_result do
print phase.toolcontext.format_h2("{desc}:")
if self.bad_methods.not_empty then
print " Affected method(s):"
for method in self.bad_methods do
var max_class_call = method.class_call.max
if max_class_call != null then
# Check if the type of max call class is generique
if max_class_call.mclass.mclass_type isa MGenericType and not phase.toolcontext.opt_move_generics.value then
print " -{method.name}({method.msignature.mparameters.join(", ")}) {method.total_self_call}/{method.class_call[max_class_call]}"
else
print " -{method.name}({method.msignature.mparameters.join(", ")}) {method.total_self_call}/{method.class_call[max_class_call]} move to {max_class_call}"
end
end
end
end
end
src/metrics/codesmells_metrics.nit:277,2--293,4
redef fun print_result do
print phase.toolcontext.format_h2("{desc}: Average {phase.average_number_of_lines.to_i} lines")
if self.bad_methods.not_empty then
print " Affected method(s):"
for method in self.bad_methods do
print " -{method.name} has {method.line_number} lines"
end
end
end
src/metrics/codesmells_metrics.nit:324,2--332,4
redef fun print_result do
print phase.toolcontext.format_h2("{desc}:")
if self.bad_methods.not_empty then
print " Affected method(s):"
for method in self.bad_methods do
print " -{method.name}"
end
end
end
src/metrics/codesmells_metrics.nit:359,2--367,4