Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report warning with wrong file and wrong line number #10414

Closed
zejiang0jason opened this issue Nov 14, 2023 · 16 comments
Closed

Report warning with wrong file and wrong line number #10414

zejiang0jason opened this issue Nov 14, 2023 · 16 comments
Labels

Comments

@zejiang0jason
Copy link

Describe the bug
I am using doxygen 1.9.8. The test project is attached. In this project there are two files, wrong.dox and right.dox. The content of these two files are added to the same group.
right.dox content is right, wrong.dox contains a warning. While running doxygen, it reports right.dox has warning.
test_dox.zip

Expected behavior
doxygen shall report the warning is in wrong.dox.

Screenshots
Doxygen log warning
test_dox/right.dox:8: warning: Invalid list item found
image

To Reproduce
Zip package attached.

Version
1.9.8

Stack trace
No crash.

Additional context
No.

Thank you.

albert-github added a commit to albert-github/doxygen that referenced this issue Nov 15, 2023
As the `addtogroup` parts are joined together in one block the second block didn't know anymore wheer it came from originally which resulted in the wrong file name and line number.
By adding some internal commands dureng provessing this has been corrected.
@albert-github
Copy link
Collaborator

I've just pushed a proposed patch, pull request #10416

@zejiang0jason
Copy link
Author

Hi @albert-github , thanks for quick feedback, I tried but doesn't help

@albert-github
Copy link
Collaborator

albert-github commented Nov 17, 2023

@zejiang0jason
What did you try, with which version? Did you build your doxygen executable yourself or from where did you get the executable?
With your example I got:

.../wrong.dox:8: warning: Invalid list item found

doxygen added a commit that referenced this issue Nov 17, 2023
Issue #10414 Report warning with wrong file and wrong line number
@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Nov 18, 2023
@albert-github
Copy link
Collaborator

Code has been integrated in master on GitHub (please don't close the issue as this will be done at the moment of an official release).

@zejiang0jason
Copy link
Author

@zejiang0jason What did you try, with which version? Did you build your doxygen executable yourself or from where did you get the executable? With your example I got:

.../wrong.dox:8: warning: Invalid list item found

Hi @albert-github , yes, I build the executable locally, based on the PR code.

@albert-github
Copy link
Collaborator

I think the warning is correct as the indentation of the list in wrong.dox is incorrect, the item:

  - TITLE 1

has an indentation of 2, whilst the corresponding:

 - TITLE 2

has an indentation of 1 and this is reported by the warning message (before the fix the warning was pointing to the wrong file).

@zejiang0jason
Copy link
Author

Hi @albert-github , I built locally but the warning is still reported in incorrect place.

[~/test/test_dox]$ /usr/local/bin/doxygen --version
1.10.0 (4729e92540dbf6eb971fbec73f8fc855bb84a0b7*)
test/test_dox/right.dox:8: warning: Invalid list item found

I think I can try with next doxygen formal release. thanks.

@albert-github
Copy link
Collaborator

That is very weird.
It looks like that in case of /usr/local/bin/doxygen --version you use a different executable than in case you test the example.
Can you try to test your example again but with in the Doxyfile see to it that QUIET = NO so you will get messages about progress etc. On the first line you will also see the full doxygen identification, is this also the 1.10.0 (4729e92540dbf6eb971fbec73f8fc855bb84a0b7*) version?

@zejiang0jason
Copy link
Author

Hi @albert-github , I confirmed I am using the desired one, this is the log I got

Doxygen version used: 1.10.0 (4729e92540dbf6eb971fbec73f8fc855bb84a0b7*)
Searching for include files...
Searching for example files...
Searching for images...
Searching for dot files...
Searching for msc files...
Searching for dia files...
Searching for files to exclude
Searching INPUT for files to process...
Reading and parsing tag files
Parsing files
Preprocessing /home/jason/test/test_dox/wrong.dox...
Parsing file /home/jason/test/test_dox/wrong.dox...
Preprocessing /home/jason/test/test_dox/right.dox...
Parsing file /home/jason/test/test_dox/right.dox...
Building macro definition list...
Building group list...
Building directory list...
Building namespace list...
Building file list...
Building class list...
Building concept list...
Computing nesting relations for classes...
Associating documentation with classes...
Associating documentation with concepts...
Associating documentation with modules...
Building example list...
Searching for enumerations...
Searching for documented typedefs...
Searching for members imported via using declarations...
Searching for included using directives...
Searching for documented variables...
Building interface member list...
Building member list...
Searching for friends...
Searching for documented defines...
Computing class inheritance relations...
Computing class usage relations...
Flushing cached template relations that have become invalid...
Computing class relations...
Add enum values to enums...
Searching for member function documentation...
Creating members for template instances...
Building page list...
Search for main page...
Computing page relations...
Determining the scope of groups...
Computing module relations...
Sorting lists...
Determining which enums are documented
Computing member relations...
Building full member lists recursively...
Adding members to member groups.
Computing member references...
Inheriting documentation...
Generating disk names...
Adding source references...
Adding xrefitems...
Sorting member lists...
Setting anonymous enum type...
Computing dependencies between directories...
Generating citations page...
Counting members...
Counting data structures...
Resolving user defined references...
Finding anchors and sections in the documentation...
Transferring function references...
Combining using relations...
Adding members to index pages...
Correcting members for VHDL...
Computing tooltip texts...
Generating style sheet...
Generating search indices...
Generating example documentation...
Generating file sources...
Generating file documentation...
Generating page documentation...
Generating docs for page test...
/home/jason/test/test_dox/right.dox:8: warning: Invalid list item found
Generating group documentation...
Generating class documentation...
Generating concept documentation...
Generating module documentation...
Generating namespace documentation...
Generating graph info page...
Generating directory documentation...
Generating index page...
Generating page index...
Generating topic index...
Generating module index...
Generating module member index...
Generating namespace index...
Generating namespace member index...
Generating concept index...
Generating annotated compound index...
Generating alphabetical compound index...
Generating hierarchical class index...
Generating member index...
Generating file index...
Generating file member index...
Generating example index...
finalizing index lists...
writing tag file...
Running plantuml with JAVA...
type lookup cache used 0/65536 hits=0 misses=0
symbol lookup cache used 0/65536 hits=0 misses=0
finished...

@albert-github
Copy link
Collaborator

Getting even more weird, looks all OK.
I assume you see the lines:

                                          addOutput(yyscanner," \\ifile \""+ yyextra->fileName);
                                          addOutput(yyscanner,"\" \\ilinebr \\iline " + QCString().setNum(yyextra->lineNr));

in commentscan.l around line 1383.

What happens when you run:

doxygen -d commentscan > commentscan.txt

and post /attach the file commentscan.txt so I can inspect that file.

@zejiang0jason
Copy link
Author

Yes, I can see your changes in commentscan.l.

The log attached. thanks.
commentscan.txt

@albert-github albert-github removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Nov 22, 2023
@albert-github
Copy link
Collaborator

Looks like this shines a bit of a light on the problem.
In the example I have I have in the files wrong.dox and right.dox the statement @addtogroup test TEST whilst from the commentscan.txt I see that you have(most likely) @page test TEST in these files. When I adjust the files accordingly I do see again the line

right.dox:8: warning: Invalid list item found

which is the wrong line, so we have here a problem with the same type of root cause but triggered in a different way, I have to think about this....

albert-github added a commit to albert-github/doxygen that referenced this issue Nov 22, 2023
Analogous to the fix for `aqddtogroup` see @10416:
As the `page` parts are joined together in one block the second block didn't know anymore where it came from originally which resulted in the wrong file name and line number.
By adding some internal commands during processing this has been corrected.
@albert-github
Copy link
Collaborator

I've just pushed a proposed patch, pull request #10437 now for the page part

albert-github added a commit to albert-github/doxygen that referenced this issue Nov 22, 2023
…mber

the `\iline` command gave a warning about:
```
warning: invalid argument for command '\iline'
```
doxygen added a commit that referenced this issue Nov 22, 2023
Issue #10414 Report warning with wrong file and wrong line number
@zejiang0jason
Copy link
Author

Hi @albert-github , thanks, the new patch works:)

@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Nov 23, 2023
@albert-github
Copy link
Collaborator

Code (#10437) has been integrated in master on GitHub (please don't close the issue as this will be done at the moment of an official release).

@doxygen
Copy link
Owner

doxygen commented Dec 25, 2023

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.10.0.
Please verify if this is indeed the case. Reopen the
issue if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Dec 25, 2023
@doxygen doxygen closed this as completed Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants