pavlitsky / vscode-yard

YARD comments generator for Visual Studio Code
https://yardoc.org/
MIT License
23 stars 3 forks source link

Should the param name go before the type? #9

Closed dleavitt closed 4 years ago

dleavitt commented 4 years ago

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 4 years ago

@dleavitt I've added a setting for this. Please have a look https://github.com/pavlitsky/vscode-yard/issues/7#issuecomment-602278996.

dleavitt commented 4 years ago

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