-
-
Notifications
You must be signed in to change notification settings - Fork 710
DOC: fixing "unbalanced grouping commands" warnings #5262
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
DOC: fixing "unbalanced grouping commands" warnings #5262
Conversation
Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.h
Outdated
Show resolved
Hide resolved
|
I'm looking into the commit / compilation problems. |
|
You get the full list of messages if you click on the link. The first part is: Errors: commit 8b19ffd adds bad whitespace: Modules/Core/Common/include/itkPlatformMultiThreader.h:185: new blank line at EOF. commit 8b19ffd adds Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.cxx with executable permissions, but the file does not look executable. commit 8b19ffd adds Examples/IO/XML/itkParticleSwarmOptimizerSAXWriter.cxx with executable permissions, but the file does not look executable. commit 8b19ffd adds Examples/RegistrationITKv4/DeformableRegistration4.cxx with executable permissions, but the file does not look executable. commit 8b19ffd adds Examples/RegistrationITKv4/DeformableRegistration6.cxx with executable permissions, but the file does not look executable. |
|
For pre-commit: |
|
If you squash commits and force push, that might fix it.
Written on cellphone, excuse my brevity.
…On Sun, Mar 2, 2025, 11:26 albert-github ***@***.***> wrote:
The problem in the ghostflow looks like a false positive as this has been
fixed in 6e8c875
<6e8c875>
but the ghostflow refers to 8b19ffd
<8b19ffd>
So this looks to me a small problem in ghostflow, but I might be mistaken.
image.png (view on web)
<https://github.com/user-attachments/assets/b4ea848d-2551-463b-a3e7-d7c10e07db42>
—
Reply to this email directly, view it on GitHub
<#5262 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANVQ6IW34Y4P6CZPNLQEDL2SMWMTAVCNFSM6AAAAABYFKV7RKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJSHAYDGOBQGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: albert-github]*albert-github* left a comment
(InsightSoftwareConsortium/ITK#5262)
<#5262 (comment)>
The problem in the ghostflow looks like a false positive as this has been
fixed in 6e8c875
<6e8c875>
but the ghostflow refers to 8b19ffd
<8b19ffd>
So this looks to me a small problem in ghostflow, but I might be mistaken.
image.png (view on web)
<https://github.com/user-attachments/assets/b4ea848d-2551-463b-a3e7-d7c10e07db42>
—
Reply to this email directly, view it on GitHub
<#5262 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANVQ6IW34Y4P6CZPNLQEDL2SMWMTAVCNFSM6AAAAABYFKV7RKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJSHAYDGOBQGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I'll keep it in mind.
No problem. |
|
I added a new set of changes.
|
222250b to
5f0b209
Compare
|
I just squashed the commits, and applied clang-format to all files. Let's see what the CI says now. |
5f0b209 to
630350e
Compare
|
@dzenanz
|
|
There are 38 compile errors, e.g.: Modules/Core/Common/include/itkPlatformMultiThreader.h:28: error: unterminated #ifndef Indeed, the last several lines were removed from this file. |
|
@dzenanz
|
5457138 to
2d884aa
Compare
|
No problem. Thank you for contributing! |
|
Looking at ITK CDash, search for "Build Names" containing |
|
@dzenanz It is strange that a number of files missed some last lines (but with that many files it, unfortunately, can happen). I'll try to fix them (maybe one by one but hopefully faster. |
|
The CDash Experimental table is usually refreshed once the CI build workers finish, and report failures both to GitHub (the list of checks in the PR) and CDash. Without compile errors, a few hours. With compile errors, sooner 😄 |
|
Thanks. I'll check it out. |
|
Errors:
|
|
Any idea about the error from the kwrobot at #5262 (comment) Edit looks like the ghostflow wants now to revert a change that it beforehand would like to have... Edit 2 Looks partly like a self healing system. but now the precommit throws a similar message ... |
|
It is a small number of style errors now:
|
|
@dzenanz |
f337250 to
e056835
Compare
|
@dzenanz
As a side note maybe we should hide the comments regarding the ITK Software Guide (don't delete them as they contain still some valuable information, at least for me). |
|
From my side I finished with the update of the PR, though I see that ITK.Pixi / Pixi-Cxx (macos-14) fails but I have no idea of the reason. |
|
The reason was: This test is known to fail occasionally. I have restarted the failed tests. |
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.
LGTM. Thank you Albert!
We will want to squash upon merge. Alternatively, we could squash commits and amend this PR.
|
Regarding the squashing /amending I'll leave it to you. |
|
@thewtex the PR with updated documentation is here: InsightSoftwareConsortium/ITKSoftwareGuide#225 |
16b1e55 to
645e9b8
Compare
|
Squashed into a single commit, removed superficial commits, rebased on |
|
Should we plan to merge this today? Or give another day or two for additional review? |
Fix "unbalanced grouping commands" Doxygen warnings:
- Use a brute force approach to fix the "unbalanced grouping commands"
Doxygen warnings by explicitly placing the `ALIASES`
`ITKStartGrouping` and `ITKEndGrouping` around the appropriate code
blocks. This involved a multi-step, trial and error process where an
initial attempt was made to address such warnings by inserting the
Doxygen commands `@{` and `@}` around the identified faulty blocks,
and then any new warnings appeared as a result of those changes was
solved in an interative, manual process.
- Remove grouping around single functions.
- Remove grouping from `Examples`: the code in the `Examples` folder
is meant to serve as files hosting code blocks used by the ITK
Software Guide and such files do not appear in the ITK Doxygen
documentaion. Thus, grouping has no meaningful application within
these files.
The use of the `Utilities/Doxygen/itkgroup.py` script to introduce the
Doxygen grouping markers at the appropriate places has been abandoned as
this implicitly added the commands based on the layout. Grouping is hard
to enforce automatically and it is also hard to get an error-free output
from this script (would nearly require a compiler).
Virtually all of the grouping in ITK happens around `Get`/`Set` method
pairs.
Doxygen grouping documentation:
https://www.doxygen.nl/manual/grouping.html
645e9b8 to
650cf36
Compare
|
I am fine giving it 1 or 2 days in case anybody wants to try locally and check that the squash did not break down things. Thanks for all the work @albert-github and to those that reviewed this. |
|
Albert, thanks again for your efforts on improving ITK's documentation! |
|
We are down to 91 warnings: Mostly non-existing group warnings. |
|
Regarding the comment: #5262 (comment)
|
The only relevant module in
|
|
@jhlegarreta For completeness my complete CMake line: |
I do not think any extra flags need to be added for |
|
I did some tests and saw the tin the I tried also where I moved Looks like there are some problems:
best is that I first look into the doxygen side problem before, eventually, resetting the |
|
FYI For the doxygen problem I've just created a proposed pull request: doxygen/doxygen#11519 |
|
Thanks for this effort @albert-github. So, best would be to move the conversation to the appropriate issue or eventual PR now that you seem on track wrt the issues you faced in #5262 (comment). |
The default setting for `CASE_SENSE_NAMES` (in doxygen) is `SYSTEM` which means that on Linux it is set to `YES` and on (e.g.) Windows to `NO` (see analysis in InsightSoftwareConsortium#5262 (comment)). Seen the usage of the `EXCLUDE_PATTERN` `*/test*` this meant on Windows that also the directory with the name `TestKernel` was matched and thus excluded. Setting the `CASE_SENSE_NAMES` explicitly to `YES` prevents this (on Linux it won't have any effect as here the default was sufficient). Note: Due to a bug in doxygen (see doxygen/doxygen#11519) this would still exclude the pattern. The new setting will only have an effect, on Windows, when, the not yet released, doxygen 1.14.0 or newer will be used.
The default setting for `CASE_SENSE_NAMES` (in doxygen) is `SYSTEM` which means that on Linux it is set to `YES` and on (e.g.) Windows to `NO` (see analysis in #5262 (comment)). Seen the usage of the `EXCLUDE_PATTERN` `*/test*` this meant on Windows that also the directory with the name `TestKernel` was matched and thus excluded. Setting the `CASE_SENSE_NAMES` explicitly to `YES` prevents this (on Linux it won't have any effect as here the default was sufficient). Note: Due to a bug in doxygen (see doxygen/doxygen#11519) this would still exclude the pattern. The new setting will only have an effect, on Windows, when, the not yet released, doxygen 1.14.0 or newer will be used.

Fix "unbalanced grouping commands" Doxygen warnings:
ALIASESITKStartGroupingandITKEndGroupingaround the appropriate code blocks. This involved a multi-step, trial and error process where an initial attempt was made to address such warnings by inserting the Doxygen commands@{and@}around the identified faulty blocks, and then any new warnings appeared as a result of those changes wassolved in an interative, manual process.
Examples: the code in theExamplesfolder is meant to serve as files hosting code blocks used by the ITK Software Guide and such files do not appear in the ITK Doxygen documentaion. Thus, grouping has no meaningful application within these files.The use of the
Utilities/Doxygen/itkgroup.pyscript to introduce the Doxygen grouping markers at the appropriate places has been abandoned as this implicitly added the commands based on the layout. Grouping is hard to enforce automatically and it is also hard to get an error-free output from this script (would nearly require a compiler).Virtually all of the grouping in ITK happens around
Get/Setmethod pairs.Doxygen grouping documentation:
https://www.doxygen.nl/manual/grouping.html
This is related to issue #3654
PR Checklist