From: Jean Privat Date: Wed, 1 Oct 2014 21:17:06 +0000 (-0400) Subject: Merge: modelize: `missing-doc` on attributes X-Git-Tag: v0.6.9~1 X-Git-Url: http://nitlanguage.org?hp=5d77ad22b63f7ba6c2a845608de7a4ec911b18f6 Merge: 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. Pull-Request: #800 Reviewed-by: Lucas Bajolet Reviewed-by: Alexandre Terrasa --- diff --git a/src/modelize/modelize_property.nit b/src/modelize/modelize_property.nit index 28e6a03..941d4ee 100644 --- a/src/modelize/modelize_property.nit +++ b/src/modelize/modelize_property.nit @@ -775,7 +775,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) @@ -793,7 +792,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