DOC: Avoid documenting ivar default values in SpatialFunction class#4115
Conversation
Avoid documenting ivar default values in `itk::ConicShellInteriorExteriorSpatialFunction` since: - All ivar values should be initialized to some default value. - When default values are changed, it is easy to forget about updating the documentation and making it inconsistent with the actual value in the code.
|
Not sure there is another way to show ivar default values through the Doxygen documentation, but I do think that we should avoid documenting explicitly for the above reasons. Cross-referencing: InsightSoftwareConsortium/ITKSoftwareGuide#202 |
There was a problem hiding this comment.
Well... in general there is always redundancy between documentation and implementation. And one may accidentally forget to keep the documentation consistent with the implementation. But in this particular case, the initialization is itself already included with the doxygen output at https://itk.org/Doxygen/html/classitk_1_1ConicShellInteriorExteriorSpatialFunction.html#aa0bf34461e6adf408abc7a0bf6e995c5 as it says:
bool [...] m_Polarity { false }
So end users can find the default initial value of Polarity from the documentation this way.
Thanks Jon! 👍
|
Ah, thanks @N-Dekker, I had a quick look yesterday before adding the GitHub message and looks like I completely missed it. |
|
Looks like the badges in the but Azure builds are not Also, badges are pointing at different commits across builds, e.g. f602b3c1 for @thewtex @tbirdso would you be able to investigate this, please? Thanks. |


Avoid documenting ivar default values in
itk::ConicShellInteriorExteriorSpatialFunctionsince:PR Checklist