From: Jean Privat Date: Wed, 1 Oct 2014 13:21:07 +0000 (-0400) Subject: modelize: `missing-doc` on attributes X-Git-Tag: v0.6.9~1^2 X-Git-Url: http://nitlanguage.org modelize: `missing-doc` on attributes missing-doc only fires on public properties. But attributes are always Private, so consider the getter method instead. It make sense since the documentation on an attribute documents more the getter than the attribute. Signed-off-by: Jean Privat --- diff --git a/src/modelize/modelize_property.nit b/src/modelize/modelize_property.nit index 5b51894..6a22cfb 100644 --- a/src/modelize/modelize_property.nit +++ b/src/modelize/modelize_property.nit @@ -778,7 +778,6 @@ redef class AAttrPropdef var mpropdef = new MAttributeDef(mclassdef, mprop, self.location) self.mpropdef = mpropdef modelbuilder.mpropdef2npropdef[mpropdef] = self - set_doc(mpropdef, modelbuilder) var readname = name var mreadprop = modelbuilder.try_get_mproperty_by_name(nid2, mclassdef, readname).as(nullable MMethod) @@ -796,7 +795,8 @@ redef class AAttrPropdef var mreadpropdef = new MMethodDef(mclassdef, mreadprop, self.location) self.mreadpropdef = mreadpropdef modelbuilder.mpropdef2npropdef[mreadpropdef] = self - mreadpropdef.mdoc = mpropdef.mdoc + set_doc(mreadpropdef, modelbuilder) + mpropdef.mdoc = mreadpropdef.mdoc var atlazy = self.get_single_annotation("lazy", modelbuilder) if atlazy != null then