Should the param name go before the type?
Closed this issue · 2 comments
dleavitt commented
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 commented
@dleavitt I've added a setting for this. Please have a look #7 (comment).
dleavitt commented
Appears I entirely missed the fact that there was a README! Sorry about that + thanks for replying!