Skip to content

STYLE: Remove empty comment lines in itk::TriangleCell implementation#4114

Merged
hjmjohnson merged 1 commit intoInsightSoftwareConsortium:masterfrom
jhlegarreta:RemoveTriangleCellEmptyCommentLines
Jul 28, 2023
Merged

STYLE: Remove empty comment lines in itk::TriangleCell implementation#4114
hjmjohnson merged 1 commit intoInsightSoftwareConsortium:masterfrom
jhlegarreta:RemoveTriangleCellEmptyCommentLines

Conversation

@jhlegarreta
Copy link
Copy Markdown
Member

Remove unnecessary single-comment, empty lines when introducing comment blocks in itk::TriangleCell implementation.

PR Checklist

Remove unnecessary single-comment, empty lines when introducing comment
blocks in `itk::TriangleCell` implementation.
@github-actions github-actions bot added area:Core Issues affecting the Core module type:Style Style changes: no logic impact (indentation, comments, naming) labels Jul 16, 2023
@jhlegarreta
Copy link
Copy Markdown
Member Author

This behavior is allowed by the ITK SW Guide:
https://github.com/InsightSoftwareConsortium/ITKSoftwareGuide/blob/master/SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex#L2909

The commit started when I changed the whitespaces between the comment character and the comment itself in
https://github.com/InsightSoftwareConsortium/ITK/pull/4114/files#diff-0f33d6ca3071b761eafeb4067fd7a2404113a7722283834a7869701bddeb2d29L305
and when finding other single-line, empty lonely comments:
https://github.com/InsightSoftwareConsortium/ITK/pull/4114/files#diff-0f33d6ca3071b761eafeb4067fd7a2404113a7722283834a7869701bddeb2d29L540

If the behavior should be discouraged, happy to make a PR to the ITK SW Guide; if we think it makes the code more readable, then happy to modify this commit to only remove the whitespaces in
https://github.com/InsightSoftwareConsortium/ITK/pull/4114/files#diff-0f33d6ca3071b761eafeb4067fd7a2404113a7722283834a7869701bddeb2d29L305

Copy link
Copy Markdown
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

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

I wholeheartedly agree with this change. Maybe this style of comments has the "advantage" of raising number of comment lines with little effort. I find it highly annoying, as it wastes vertical real estate.

@dzenanz
Copy link
Copy Markdown
Member

dzenanz commented Jul 17, 2023

Adding a PR to software guide would be good too!

@jhlegarreta
Copy link
Copy Markdown
Member Author

Adding a PR to software guide would be good too!

InsightSoftwareConsortium/ITKSoftwareGuide#203

@hjmjohnson hjmjohnson merged commit 16f4226 into InsightSoftwareConsortium:master Jul 28, 2023
@jhlegarreta jhlegarreta deleted the RemoveTriangleCellEmptyCommentLines branch July 28, 2023 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Core Issues affecting the Core module type:Style Style changes: no logic impact (indentation, comments, naming)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants