Closed Mziserman closed 4 years ago
@Mziserman I believe these are both legit and it's up to implementation which one to use.
Item 3 here https://www.rubydoc.info/gems/yard/file/docs/Tags.md#Common_Tag_Syntaxes says:
..name key, placed either before or after the types list.
Moreover, on that page they use both syntaxes too:
@param [String] username the username to quit
as well as
@param user [String] the username for the operation
I chose the type-before-name syntax as it seemed more common to me, the other one may have its benefits too. Maybe we should have a setting for this?
Ho yes you are right, thanks for pointing me to the right place in the doc.
Maybe we should have a setting for this?
Don't do it on my account, I'm happy to use "[type] name description" if it's a valid format.
Thanks for the quick clarification !
I would like to see this as an option.
Done. Set yard.tags.paramNameBeforeType
to true
to make extension use name-before-type variant.
Hello,
It seems to me the correct order is @param #{param_name} [#{type}] #{description}
while this plugin generates @param [#{type}] #{param_name} #{description}.
Am I wrong ? I got this from https://www.rubydoc.info/gems/yard/file/docs/Tags.md#Hashes for example.