nitmetrics: add option --all to compute all metrics
[nit.git] / src / metrics / metrics_base.nit
index 7bb23d9..18b19e3 100644 (file)
@@ -21,6 +21,21 @@ import modelbuilder
 
 redef class ToolContext
 
+       # --all
+       var opt_all = new OptionBool("Compute all metrics", "--all")
+
+       # --refinement
+       var opt_refinement = new OptionBool("Compute metrics about refinement usage", "--refinement")
+       # --self
+       var opt_self = new OptionBool("Compute metrics about the usage of explicit and implicit self", "--self")
+       # --nullables
+       var opt_nullables = new OptionBool("Compute metrics on nullables send", "--nullables")
+       # --static-types
+       var opt_static_types = new OptionBool("Compute explicit static types metrics", "--static-types")
+       # --tables
+       var opt_tables = new OptionBool("Compute tables metrics", "--tables")
+       # --rta
+       var opt_rta = new OptionBool("Compute RTA metrics", "--rta")
        # --generate_hyperdoc
        var opt_generate_hyperdoc = new OptionBool("Generate Hyperdoc", "--generate_hyperdoc")
 
@@ -30,6 +45,13 @@ redef class ToolContext
        redef init
        do
                super
+               self.option_context.add_option(opt_all)
+               self.option_context.add_option(opt_refinement)
+               self.option_context.add_option(opt_self)
+               self.option_context.add_option(opt_nullables)
+               self.option_context.add_option(opt_static_types)
+               self.option_context.add_option(opt_tables)
+               self.option_context.add_option(opt_rta)
                self.option_context.add_option(opt_generate_hyperdoc)
                self.option_context.add_option(opt_dir)
        end