Skip to content

Commit

Permalink
Line miscounting in case of structural indicator
Browse files Browse the repository at this point in the history
In case the (first) structural indicator is not at the beginning of a comment block, the line counting is not correct and we get warnings like:
```
.../dd.h:4: warning: Found unknown command '@error_2'
.../dd.h:8: warning: Found unknown command '@error_6'
.../PrivacyideaService.php:22: warning: Unsupported xml/html tag <service> found
.../PrivacyideaService.php:29: warning: Found unknown command '@subpackage'
```
whilst the correct line numbers should be here: 2, 6, 13 and 20.

The problem only occurs for the first structural indicator.
(It is a bad idea to have the, first, structural indicator in the middle of a comment block.)
  • Loading branch information
albert-github committed Nov 12, 2023
1 parent 22c7b98 commit b97e7a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commentscan.l
Expand Up @@ -3495,7 +3495,7 @@ static bool makeStructuralIndicator(yyscan_t yyscanner,EntryType t)
yyextra->current->section = t;
yyextra->current->fileName = yyextra->fileName;
yyextra->current->startLine = yyextra->lineNr;
yyextra->current->docLine = yyextra->lineNr;
if (yyextra->current->docLine == -1) yyextra->current->docLine = yyextra->lineNr;
return FALSE;
}
}
Expand Down

0 comments on commit b97e7a9

Please sign in to comment.