Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add Documentation section to style guide #1062
base: main
Are you sure you want to change the base?
Add Documentation section to style guide #1062
Changes from 2 commits
72782b2
6476e0d
25649cb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I sometimes see
@return
(singular). I like the plural version more.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.
Would
@link
be a better choice? We seem to use both interchangeably and@link
is more consistent with JSDoc.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.
We initially were using
@link
, but I think it wasn't actually working when we generated documentation? 😦 hence #800There 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.
Technically
@ref
and@link
aren't interchangeable.\ref
can have an optional link text specified after the ref name, like@ref CesiumUtility::Uri "URI parsing"
. Whereas@link
is supposed to be paired with@endlink
, like@link CesiumUtility::Uri URI parsing @endlink
. Because we use the JSDoc inline link tag,{@link name}
, Doxygen somehow seems to understand this and doesn't require us to use@endlink
. But I'd prefer to use the suggested Doxygen syntax rather than this JSDoc compatibility feature.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.
@azrogers do you know if
@ref
works the same as\ref
? If so, I think we should stick with@ref
so it matches the rest of the tags we useThere 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.
@azrogers @j9liu thanks and good to know, I'll stop using
@link
and use@ref
insteadThere 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.
@j9liu
@ref
and\ref
work the same. The@
and\
are interchangeable prefixes (I accidentally used\ref
where I meant to use@ref
in that comment). Personally, I like to use@
in the directives at the start of the line and\
for the directives in the middle of the line (like@brief Some text with a \ref Item tag
) to distinguish between inline and non-inline tags. But that's just me and it's probably best if we keep it consistent instead.