InsightSoftwareConsortium / ITK

Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
https://itk.org
Apache License 2.0
1.37k stars 660 forks source link

COMP: Fix the WDocumentation warnings for enum class. #4661

Open andrei-sandor opened 1 month ago

andrei-sandor commented 1 month ago

Used with clang

Replaced \class Doxygen annotations with \enum to avoid warnings

seanm commented 1 month ago

@dzenanz @hjmjohnson @N-Dekker : @andrei-sandor is a student working with me this summer, and he's going to take a stab at fixing some warnings in ITK with the goal of being able to enable a few more warning flags on our nightly submissions to cdash.

N-Dekker commented 1 month ago

Thanks @andrei-sandor ! Cool!

I'm interested to hear if these changes will affect the Doxygen output, for example at https://itk.org/Doxygen/html/classitk_1_1CommonEnums.html

The proposed changes look fine to me, but they caused some (undeserved) KWStyle errors. Looking at https://open.cdash.org/tests/1552684315

/home/vsts/work/1/s/Modules/Core/Common/include/itkCommonEnums.h:49: error: comment doesn't have \class /home/vsts/work/1/s/Modules/Core/Common/include/itkCommonEnums.h:76: error: comment doesn't have \class /home/vsts/work/1/s/Modules/Core/Common/include/itkCommonEnums.h:100: error: comment doesn't have \class

Probably coming from https://github.com/Kitware/KWStyle/blob/6971e89ec4c763601edf1d0ea0d6f71d42fbca5d/kwsCheckComments.cxx#L203

Do you (or anyone) know how to address those as well?

dzenanz commented 1 month ago

Maybe this condition needs to be updated to consider enum in addition to class? Or we just need to update style overwrite rules to add appropriate exceptions - probably Comments or NameOfClass from this list.

seanm commented 10 hours ago

@dzenanz @N-Dekker this is ready for review now