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

Should the param name go before the type? #9

Closed
dleavitt opened this issue Jun 17, 2020 · 2 comments
Closed

Should the param name go before the type? #9

dleavitt opened this issue Jun 17, 2020 · 2 comments

Comments

@dleavitt
Copy link

YARD documentation indicates the the parameter name goes before the type:
https://www.rubydoc.info/gems/yard/file/docs/Tags.md#param

# @param url [String] the URL of the page to download
# @param directory [String] the name of the directory to save to
def load_page(url, directory: 'pages') end

The snippet generated by this plugin looks like this, with the field names after the type name:

#
# <Description>
#
# @param [<Type>] url <description>
# @param [<Type>] directory <description>
#
# @return [<Type>] <description>
#
def load_page(url, directory: 'pages') end

I've seen both in the wild though I believe the former is preferred - should this be updated?

@pavlitsky
Copy link
Owner

@dleavitt I've added a setting for this. Please have a look #7 (comment).

@dleavitt
Copy link
Author

Appears I entirely missed the fact that there was a README! Sorry about that + thanks for replying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants