-
Notifications
You must be signed in to change notification settings - Fork 274
Update CODING_STANDARD.md #1959
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
Conversation
I prefer with colons. |
My preference is to not use colons,because it doesn't really improve readability in the code. If you want some separation between parameter name and description, instead of a colon I'd recommend adding the description on the next line and indenting two spaces (doxygen doesn't care about whitespace mostly) |
Why do you say they look weird in the documentation? |
It's not the doxygen generated documentation actually, but it does affect the CLion version |
This is the example that I was given where the colons do show: |
That's because there is a space between the parameter name and the colon |
So a solution could be then to edit the wiki to say something like - if you choose to use the colon then do not put space there. Would that still be considered inconsistent use? @peterschrammel |
Yes, it seems that doxygen correctly removes the colon only when there is no space between parameter name and colon. I'd go for that. no space + colon. |
I am against allowing both with and without a colon. I think we should standardise on one. I prefer a colon, but I appreciate that this is a personal preference. reuk introduced the current format in #869 . It seems he based it on LLVM's format, but that doesn't seem to have the colon, so either he added it or they used to have it and have got rid of it since then. |
In Doxygen comments, we do not have much consistency about whether or not to use a colon after a parameter name. This PR suggests to not use the colon as it looks a bit weird in the documentation and the doxygen manual does not use it:
https://www.stack.nl/~dimitri/doxygen/manual/docblocks.html
On the other hand the argument to use it would be that it's more readable in the code. A way to increase readability without the colon could be to align the parameter descriptions using indents.
Express your opinion.