diff options
author | albert-github <albert.tests@gmail.com> | 2019-09-30 17:13:58 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2019-09-30 17:13:58 (GMT) |
commit | 23d8bd36a5b8eb1f4d913b50db31a567a63ad994 (patch) | |
tree | 789ae56ddda1a0c46bdc13fb957817e47bd4d1b8 | |
parent | 4e21d19cf63b17aadb62905535262deb208a0c73 (diff) | |
download | Doxygen-23d8bd36a5b8eb1f4d913b50db31a567a63ad994.zip Doxygen-23d8bd36a5b8eb1f4d913b50db31a567a63ad994.tar.gz Doxygen-23d8bd36a5b8eb1f4d913b50db31a567a63ad994.tar.bz2 |
Nicer warning for missing parameter
In case of just 1 missing parameter use the singular form (checking was already done, now we just count).
-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 da4cfb2..8f7c2d2 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -508,7 +508,7 @@ static void checkUnOrMultipleDocumentedParams() { ArgumentListIterator ali(*al); const Argument *a; - bool found=FALSE; + int notArgCnt=0; for (ali.toFirst();(a=ali.current());++ali) { int count = 0; @@ -523,7 +523,7 @@ static void checkUnOrMultipleDocumentedParams() } else if (!argName.isEmpty() && g_paramsFound.find(argName)==0 && a->docs.isEmpty()) { - found = TRUE; + notArgCnt++; } else { @@ -544,14 +544,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 (ali.toFirst();(a=ali.current());++ali) { QCString argName = g_memberDef->isDefine() ? a->type : a->name; |