diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-11-01 15:53:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-01 15:53:57 (GMT) |
commit | 304b7e32fbbe7f6e5e9957ae29bcbab7fb46555d (patch) | |
tree | a5ea5ecf6a82b16a366a6c881ce6d1a6067fd04f | |
parent | 0f01005b90986347e57a78c58585aea959da72a1 (diff) | |
parent | 33a02462fcadbf2e94381b88aff2d13d904d8529 (diff) | |
download | Doxygen-304b7e32fbbe7f6e5e9957ae29bcbab7fb46555d.zip Doxygen-304b7e32fbbe7f6e5e9957ae29bcbab7fb46555d.tar.gz Doxygen-304b7e32fbbe7f6e5e9957ae29bcbab7fb46555d.tar.bz2 |
Merge pull request #7287 from albert-github/feature/bug_param_missing_warn
Nicer warning for missing parameter
-rw-r--r-- | src/docparser.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp index 48b46a9..4f52393 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -503,7 +503,7 @@ static void checkUnOrMultipleDocumentedParams() SrcLangExt lang = g_memberDef->getLanguage(); if (!al.empty()) { - bool found=FALSE; + int notArgCnt=0; for (const Argument &a: al) { int count = 0; @@ -518,7 +518,7 @@ static void checkUnOrMultipleDocumentedParams() } else if (!argName.isEmpty() && g_paramsFound.find(argName)==0 && a.docs.isEmpty()) { - found = TRUE; + notArgCnt++; } else { @@ -539,14 +539,16 @@ static void checkUnOrMultipleDocumentedParams() " has multiple @param documentation sections"); } } - if (found) + if (notArgCnt>0) { bool first=TRUE; QCString errMsg= - "The following parameters of "+ + "The following parameter"; + errMsg+= (notArgCnt>1 ? "s" : ""); + errMsg+=" of "+ QCString(g_memberDef->qualifiedName()) + QCString(argListToString(al)) + - " are not documented:\n"; + (notArgCnt>1 ? " are" : " is") + " not documented:\n"; for (const Argument &a : al) { QCString argName = g_memberDef->isDefine() ? a.type : a.name; |