pep8analysis: intro a variant main program for a web interface
[nit.git] / src / metrics / metrics_base.nit
index 64770df..e39cf51 100644 (file)
@@ -86,7 +86,7 @@ redef class ToolContext
                self.option_context.add_option(opt_nocolors)
        end
 
-       redef fun process_options
+       redef fun process_options(args)
        do
                super
                var val = self.opt_dir.value
@@ -251,6 +251,15 @@ class IntMetric
                end
                return above
        end
+
+       redef fun to_console(indent, colors) do
+               super
+               if colors then
+                       print "{"\t" * indent}  sum: {sum}".light_gray
+               else
+                       print "{"\t" * indent}  sum: {sum}"
+               end
+       end
 end
 
 # A Metric that collects float datas
@@ -319,6 +328,16 @@ class FloatMetric
                end
                return above
        end
+
+       redef fun to_console(indent, colors) do
+               super
+               if colors then
+                       print "{"\t" * indent}  sum: {sum}".light_gray
+               else
+                       print "{"\t" * indent}  sum: {sum}"
+               end
+       end
+
 end
 
 # A MetricSet is a metric holder