Skip to content

Commit

Permalink
Incorrect warnings due to WARN_IF_DOC_ERROR=NO
Browse files Browse the repository at this point in the history
In case we have a simple file like:
```
/// \file

/// \brief void fie
///
/// \param a first arg
/// \param b second arg
/// \param c third arg
void fie0(int a, int b, int c){}
```
and set:
```
WARN_IF_DOC_ERROR=NO
```
we get the warnings:
```
..../aa.h:8: warning: The following parameters of fie0(int a, int b, int c) are not documented:
  parameter 'a'
  parameter 'b'
  parameter 'c'
```

This is due to the new setting `WARN_IF_INCOMPLETE_DOC` (since 1.9.2) and this needs `paramsFound` which is set in `checkArgumentName` but was skipped due to `WARN_IF_DOC_ERROR=NO`.
  • Loading branch information
albert-github committed Nov 26, 2021
1 parent c838133 commit 147d6cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/docparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ QCString DocParser::findAndCopyImage(const QCString &fileName, DocImage::Type ty
*/
void DocParser::checkArgumentName()
{
if (!Config_getBool(WARN_IF_DOC_ERROR)) return;
if (!(Config_getBool(WARN_IF_DOC_ERROR) || Config_getBool(WARN_IF_INCOMPLETE_DOC))) return;
if (context.memberDef==0) return; // not a member
std::string name = context.token->name.str();
const ArgumentList &al=context.memberDef->isDocsForDefinition() ?
Expand Down

0 comments on commit 147d6cc

Please sign in to comment.