X-Git-Url: http://nitlanguage.org diff --git a/src/modelbuilder.nit b/src/modelbuilder.nit index cebbe1b..48bc6fa 100644 --- a/src/modelbuilder.nit +++ b/src/modelbuilder.nit @@ -22,11 +22,7 @@ # 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`