engines: no more `super_inits` method used in old-style automatic init
[nit.git] / src / modelbuilder.nit
index cebbe1b..48bc6fa 100644 (file)
 # FIXME add missing error checks
 module modelbuilder
 
-import parser
 import model
-import poset
-import opts
-import toolcontext
 import phase
 
 private import more_collections
@@ -634,6 +630,8 @@ class ModelBuilder
                                var mdoc = ndoc.to_mdoc
                                mmodule.mdoc = mdoc
                                mdoc.original_mentity = mmodule
+                       else
+                               advice(decl, "missing-doc", "Documentation warning: Undocumented module `{mmodule}`")
                        end
                end
 
@@ -719,9 +717,16 @@ class ModelBuilder
 
        # Helper function to display a warning on a node.
        # Alias for: `self.toolcontext.warning(n.hot_location, text)`
-       fun warning(n: ANode, text: String)
+       fun warning(n: ANode, tag, text: String)
+       do
+               self.toolcontext.warning(n.hot_location, tag, text)
+       end
+
+       # Helper function to display an advice on a node.
+       # Alias for: `self.toolcontext.advice(n.hot_location, text)`
+       fun advice(n: ANode, tag, text: String)
        do
-               self.toolcontext.warning(n.hot_location, text)
+               self.toolcontext.advice(n.hot_location, tag, text)
        end
 
        # Force to get the primitive method named `name` on the type `recv` or do a fatal error on `n`