-
Notifications
You must be signed in to change notification settings - Fork 2k
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
tools/doccheck: extend script to also check for Doxygen groups defined multiple times #11813
tools/doccheck: extend script to also check for Doxygen groups defined multiple times #11813
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No ideas about how doxygen groups should be handled.
7b0ac83
to
5bfddee
Compare
Thanks for having a first look @cladmi.
I tend to think that there should only one call to defgroup for a given group, even if Doxygen doesn't raise a warning when there are duplicate defgroup. Your previous comments should be addressed now. I reworked a bit the initial version of this PR following them. |
Please rebase and squash so I can have another look with #11814 merged. |
3497dd7
to
efd0b63
Compare
Done |
If you think it's not needed, then i'm fine with removing the counts. It will simplify quite a few this PR (it was a nightmare to make it work correctly with the counts ;) ). |
I always prefer exact numbers over no numbers, however in this case I don't think they justify the code complexity that is introduced here ;-). |
@miri64. I reworked the script like you suggested in a fixup commit. I added a second commit with the same print improvement for undefined groups (only compute the list of groups and files if there are undefined groups found). |
then | ||
COUNT=$(echo "${MULTIPLE_DEFINED_GROUPS}" | wc -l) | ||
echo -ne "${CERROR}ERROR${CRESET} " | ||
echo -e "There are ${CWARN}${COUNT}${CRESET} Doxygen groups defined multiple times:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:-)
Will look into it in detail and test tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The printed variable is not computed if no undefined group is found
4be5c46
to
5837075
Compare
@miri64, merge ? |
Yepp, sorry, lost track. |
Contribution description
While reworking #8939, I noticed several nucleo boards were having their Doxygen groups (e.g.
boards_nucleo-xxx
) defined indoc.txt
andperiph_conf.h
.After looking into it a bit more, it appears that some other Doxygen groups, in different parts of the code, have the same problem.
The idea of this PR is to extend the doccheck script to also check groups that are defined multiple times and to return the number of times and files where the groups are defined.
For the moment, the script doesn't exit with a return code != 0 in case of problem but simply prints the problematic groups with a warning. So it can be merged without bad consequences on static tests.
Previous checks still work (according to my local tests).
I'll open another PR with all reported doxygen group fixed and a change to make the script return an error if one or several groups are defined multiple times.
Testing procedure
make static-test
and check the outputIssues/PRs references
The PR containing all the fixes will arrive soon.All problems found are fixed by #11814