Skip to content

puppet-strings insists on redundant return value for puppet functions #297

Open
@smortex

Description

@smortex

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):

# @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.

Environment

  • Version : 2.9.0
  • Platform : Any

Additional Context

Suggested by @ekohl in puppetlabs/puppetlabs-stdlib#1239 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions