You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generating the documentation of a Puppet function, puppet-strings wants to see a @return tag in the comments, while the code already include the returned type.
Expected Behavior
puppet-strings should not want a @return tag.
Steps to Reproduce
Generate the documentation of a function (example taken from stdlib):
# @summary function to cast ensure parameter to resource specific value
function stdlib::ensure(
Variant[Boolean, Enum['present', 'absent']] $ensure,
Enum['directory', 'link', 'mounted', 'service', 'file', 'package'] $resource,
) >> String {
# [...]
}
Note the >> String that tells what the function returns.
Currently, the generated Markdown documentation will contain the return type whether or not a @return tag exists; however, Strings will still issue a warning about the missing tag. It should always be possible to include a tag, and that's of course what's recommended in the style guide, but if your type names are sufficiently descriptive, just being forced to type in a @return to shut Strings up feels pretty superfluous, especially for very simple returns.
Describe the Bug
When generating the documentation of a Puppet function, puppet-strings wants to see a
@return
tag in the comments, while the code already include the returned type.Expected Behavior
puppet-strings should not want a
@return
tag.Steps to Reproduce
Generate the documentation of a function (example taken from stdlib):
Note the
>> String
that tells what the function returns.Environment
Additional Context
Suggested by @ekohl in puppetlabs/puppetlabs-stdlib#1239 (comment)
The text was updated successfully, but these errors were encountered: