modelize: advice on missing documentation
authorJean Privat <jean@pryen.org>
Fri, 19 Sep 2014 19:09:59 +0000 (15:09 -0400)
committerJean Privat <jean@pryen.org>
Mon, 22 Sep 2014 15:28:42 +0000 (11:28 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/modelbuilder.nit
src/modelize/modelize_class.nit
src/modelize/modelize_property.nit

index 69dd2bf..48bc6fa 100644 (file)
@@ -630,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
 
index ed4df60..8bc6ef2 100644 (file)
@@ -182,6 +182,8 @@ redef class ModelBuilder
                                var mdoc = ndoc.to_mdoc
                                mclassdef.mdoc = mdoc
                                mdoc.original_mentity = mclassdef
+                       else if mclassdef.is_intro and mclass.visibility >= public_visibility then
+                               advice(nclassdef, "missing-doc", "Documentation warning: Undocumented public class `{mclass}`")
                        end
                end
 
index bf54e73..2e7af1b 100644 (file)
@@ -418,6 +418,8 @@ redef class APropdef
                        var mdoc = ndoc.to_mdoc
                        mpropdef.mdoc = mdoc
                        mdoc.original_mentity = mpropdef
+               else if mpropdef.is_intro and mpropdef.mproperty.visibility >= protected_visibility then
+                       modelbuilder.advice(self, "missing-doc", "Documentation warning: Undocumented property `{mpropdef.mproperty}`")
                end
 
                var at_deprecated = get_single_annotation("deprecated", modelbuilder)