Skip to content
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

doc: add alias for properties of functions #25411

Closed
wants to merge 1 commit into from

Conversation

nashif
Copy link
Member

@nashif nashif commented May 18, 2020

Use @prop to describe function properries. In both doxygen and RST docs
this will appear as a note.

Fixes #21061

Use @prop to describe function properries. In both doxygen and RST docs
this will appear as a note.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
@carlescufi carlescufi added this to the v2.4.0 milestone May 18, 2020
@nashif
Copy link
Member Author

nashif commented May 18, 2020

example (The text in there is a placeholder, no suggestion on the wording is being made here):

image

image

ALIASES = "rst=\verbatim embed:rst:leading-asterisk" \
"endrst=\endverbatim"
ALIASES = "rst=\verbatim embed:rst:leading-asterisk" "endrst=\endverbatim"
ALIASES += "prop=\note @b Properties: @b"
Copy link
Member

Choose a reason for hiding this comment

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

Should the alias be named funcprop instead? That is what we decided here:
#21061 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

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

why do you need func in here? we have param, not funcparam, brief, not funcbrief! I think @prop should be enough and function is implied.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Doxygen also already has @property which does something different and could confuse people.

Copy link
Member

Choose a reason for hiding this comment

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

I think we should use a unequivocal name that is exclusive to zephyr to avoid any potential clashes. Hence the funcprop proposal that we settled on last week.

@carlescufi carlescufi modified the milestones: v2.4.0, v2.3.0 May 18, 2020
Copy link
Collaborator

@pabigot pabigot left a comment

Choose a reason for hiding this comment

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

I don't see any problem with this, but it doesn't address the more fundamental issue of how the annotation is to be done in the source code. For k_sleep() that might be:

@funcprop sleep

or

@funcprop sleep reschedule

depending on whether the implicit properties are made explicit.

Depending on what we want the annotation to look like in the code, how it gets processed by the documentation generation, and what it looks like = in the generated documentation, a section like this may or may not be appropriate. If use of a @note alias requires putting the property tags on a separate line so they don't confuse Doxygen IMO this is not a great solution.

@github-actions
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Jul 19, 2020
@github-actions github-actions bot closed this Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document where APIs can be called from using doxygen
4 participants