diff options
author | Artur Kink <artur.kinK@gmail.com> | 2016-11-29 04:20:12 (GMT) |
---|---|---|
committer | Artur Kink <artur.kinK@gmail.com> | 2016-11-29 04:20:12 (GMT) |
commit | bae3c91812f8a6f845337f8c32d55495c4aa3522 (patch) | |
tree | d98ce5c5c52870935b5b4bef6afce9e0864fd575 | |
parent | 6a85240e65bb5e3d59d2cd161eb8cf241e27ed7d (diff) | |
download | Doxygen-bae3c91812f8a6f845337f8c32d55495c4aa3522.zip Doxygen-bae3c91812f8a6f845337f8c32d55495c4aa3522.tar.gz Doxygen-bae3c91812f8a6f845337f8c32d55495c4aa3522.tar.bz2 |
Check for undocumented params warnings if members detailed documentation is not written
-rw-r--r-- | src/memberdef.cpp | 47 | ||||
-rw-r--r-- | src/memberdef.h | 1 |
2 files changed, 28 insertions, 20 deletions
diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 8f1573c..d37efb9 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -3013,26 +3013,7 @@ void MemberDef::writeDocumentation(MemberList *ml, //if (Config_getBool(EXTRACT_ALL) && !hasDocs) ol.enable(OutputGenerator::Latex); ol.popGeneratorState(); - //------------------------------------------------ - - if (!Config_getBool(EXTRACT_ALL) && - Config_getBool(WARN_IF_UNDOCUMENTED) && - Config_getBool(WARN_NO_PARAMDOC) && - !Doxygen::suppressDocWarnings) - { - if (!hasDocumentedParams()) - { - warn_doc_error(getDefFileName(),getDefLine(), - "parameters of member %s are not (all) documented", - qPrint(qualifiedName())); - } - if (!hasDocumentedReturnType() && isFunction() && hasDocumentation()) - { - warn_doc_error(getDefFileName(),getDefLine(), - "return type of member %s is not documented", - qPrint(qualifiedName())); - } - } + warnIfUndocumentedParams(); } // strip scope and field name from the type @@ -3267,9 +3248,35 @@ void MemberDef::warnIfUndocumented() warn_undoc(getDefFileName(),getDefLine(),"Member %s%s (%s) of %s %s is not documented.", qPrint(name()),qPrint(argsString()),qPrint(memberTypeName()),t,qPrint(d->name())); } + else if (!isDetailedSectionLinkable()) + { + warnIfUndocumentedParams(); + } } +void MemberDef::warnIfUndocumentedParams() +{ + if (!Config_getBool(EXTRACT_ALL) && + Config_getBool(WARN_IF_UNDOCUMENTED) && + Config_getBool(WARN_NO_PARAMDOC) && + !Doxygen::suppressDocWarnings) + { + if (!hasDocumentedParams()) + { + warn_doc_error(getDefFileName(),getDefLine(), + "parameters of member %s are not (all) documented", + qPrint(qualifiedName())); + } + if (!hasDocumentedReturnType() && + isFunction() && hasDocumentation()) + { + warn_doc_error(getDefFileName(),getDefLine(), + "return type of member %s is not documented", + qPrint(qualifiedName())); + } + } +} bool MemberDef::isFriendClass() const { diff --git a/src/memberdef.h b/src/memberdef.h index cda1baf..c0825b2 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -389,6 +389,7 @@ class MemberDef : public Definition ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd); void writeTagFile(FTextStream &); void warnIfUndocumented(); + void warnIfUndocumentedParams(); MemberDef *createTemplateInstanceMember(ArgumentList *formalArgs, ArgumentList *actualArgs); |