Jira (PDOC-285) Infer missing docs types from arguments

21 views
Skip to first unread message

Glenn Sarti (JIRA)

unread,
Jul 30, 2019, 8:05:03 AM7/30/19
to puppe...@googlegroups.com
Glenn Sarti created an issue
 
Puppet Strings / Improvement PDOC-285
Infer missing docs types from arguments
Issue Type: Improvement Improvement
Assignee: Unassigned
Created: 2019/07/30 5:04 AM
Priority: Normal Normal
Reporter: Glenn Sarti

Given a manifest of

# A Puppet Data Type in Ruby.
#
# @param arg1 [String] String A message parameter.
# @param arg2 An Optional Numeric parameter.
Puppet::DataTypes.create_type('ValidModuleDataType') do
  interface <<-PUPPET
    attributes => {
      arg1  => { type => String, value => "defaultvalue" }
      arg2  => { type => Optional[Numeric], value => -1 }
    }
    PUPPET
end

The arg2 type should be automatically inferred as Optional[Numeric] however currently Puppet-Strings (2.3.0) thinks there is no type information for arg2.

While not critical, this should be fixed.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Glenn Sarti (JIRA)

unread,
Jul 30, 2019, 9:20:03 AM7/30/19
to puppe...@googlegroups.com
Glenn Sarti commented on Improvement PDOC-285
 
Re: Infer missing docs types from arguments

PR is at https://github.com/puppetlabs/puppet-strings/pull/209

In the example above, it was missing a comma in the interface spec. This PR will fix that issue.

Jesse Scott (JIRA)

unread,
Aug 6, 2019, 7:41:02 PM8/6/19
to puppe...@googlegroups.com
Jesse Scott assigned an issue to Glenn Sarti
 
Change By: Jesse Scott
Assignee: Glenn Sarti
Reply all
Reply to author
Forward
0 new messages