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

tools/doccheck: extend script to also check for Doxygen groups defined multiple times #11813

Merged

Conversation

aabadie
Copy link
Contributor

@aabadie aabadie commented Jul 7, 2019

Contribution description

While reworking #8939, I noticed several nucleo boards were having their Doxygen groups (e.g. boards_nucleo-xxx) defined in doc.txt and periph_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

  • Run make static-test and check the output
  • Verify the listed groups are indeed problematic
  • CI should not fail

Issues/PRs references

The PR containing all the fixes will arrive soon. All problems found are fixed by #11814

@aabadie aabadie added Area: doc Area: Documentation Area: CI Area: Continuous Integration of RIOT components Area: tools Area: Supplementary tools labels Jul 7, 2019
@aabadie aabadie added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 7, 2019
@cladmi cladmi removed their assignment Jul 9, 2019
Copy link
Contributor

@cladmi cladmi left a 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.

@aabadie aabadie force-pushed the pr/tools/doccheck_detect_duplicate_defgroup branch from 7b0ac83 to 5bfddee Compare August 5, 2019 12:04
@aabadie
Copy link
Contributor Author

aabadie commented Aug 5, 2019

Thanks for having a first look @cladmi.

No ideas about how doxygen groups should be handled.

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.

@miri64
Copy link
Member

miri64 commented Aug 6, 2019

Please rebase and squash so I can have another look with #11814 merged.

@aabadie aabadie force-pushed the pr/tools/doccheck_detect_duplicate_defgroup branch 2 times, most recently from 3497dd7 to efd0b63 Compare August 6, 2019 08:15
@aabadie
Copy link
Contributor Author

aabadie commented Aug 6, 2019

Done

@aabadie
Copy link
Contributor Author

aabadie commented Aug 6, 2019

Do they have to be counted?

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 ;) ).

@miri64
Copy link
Member

miri64 commented Aug 6, 2019

Do they have to be counted?

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 ;-).

@aabadie
Copy link
Contributor Author

aabadie commented Aug 6, 2019

@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:"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:-)

@miri64
Copy link
Member

miri64 commented Aug 6, 2019

Will look into it in detail and test tomorrow.

Copy link
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK. If I execute dist/tools/doccheck/check.sh on the branch of this PR as is, I get no error output.

If I revert e.g. bd816f3 from #11814, I get

ERROR There are 1 Doxygen groups defined multiple times:

pkg_lwip defined in:
	pkg/lwip/doc.txt
	pkg/lwip/include/lwip.h

@aabadie aabadie force-pushed the pr/tools/doccheck_detect_duplicate_defgroup branch from 4be5c46 to 5837075 Compare August 7, 2019 08:33
@aabadie
Copy link
Contributor Author

aabadie commented Aug 8, 2019

@miri64, merge ?

@miri64
Copy link
Member

miri64 commented Aug 8, 2019

Yepp, sorry, lost track.

@miri64 miri64 merged commit 2f8234a into RIOT-OS:master Aug 8, 2019
@aabadie aabadie deleted the pr/tools/doccheck_detect_duplicate_defgroup branch August 8, 2019 18:41
@kb2ma kb2ma added this to the Release 2019.10 milestone Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CI Area: Continuous Integration of RIOT components Area: doc Area: Documentation Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants