Permalink
Browse files

Check for undocumented params warnings if members detailed documentat…

…ion is not written
  • Loading branch information...
artur-kink committed Nov 29, 2016
1 parent 6a85240 commit bae3c91812f8a6f845337f8c32d55495c4aa3522
Showing with 28 additions and 20 deletions.
  1. +27 −20 src/memberdef.cpp
  2. +1 −0 src/memberdef.h
View
@@ -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
{
View
@@ -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);

0 comments on commit bae3c91

Please sign in to comment.