Issue #2364 has been updated by Alan Harder.
Here's the test file I've been using recently:
<pre># Test class
class test {
# Subclass right at start
class sub1 {
}
$test = 'foo'
# Subclass following a variable assignment
class sub2 {
}
if $hoho { $blah = 'foo' }
# Subclass following an if block
class sub3 {
}
notify { 'foo': }
# Subclass following a resource
class sub4 {
}
# Subclass following another subclass
class sub5 {
}
}
</pre>
With 2.6.3rc3 I found that "Subclass following an if block" was the only one
that did not appear when running "puppet doc testfile.pp".
----------------------------------------
Bug #2364: No puppetdoc for subclass not preceded by resource or another
subclass
https://projects.puppetlabs.com/issues/2364
Author: Alan Harder
Status: Re-opened
Priority: Normal
Assignee: James Turnbull
Category: documentation
Target version: 2.6.x
Affected Puppet version: 2.6.0
Keywords: puppetdoc
Branch:
Using 0.24.8 on Solaris 10.
Consider this modules/test/manifests/init.pp:
<pre>
# Test class
class test {
# Test subclass
class subclass {
}
}
</pre>
puppetdoc (rdoc mode) includes both "Test class" and "Test subclass" comments
in the appropriate places. However, this code:
<pre>
# Test class
class test {
$foo = 1
# Test subclass
class subclass {
}
}
</pre>
This time puppetdoc does not include "Test subclass" in the page for
test::subclass.
With some experimentation I found that the preceding comment for a subclass
does get parsed if the code before it is a } that ends a resource or another
subclass. Other code (like the assignment above, or even a } ending an "if"
block) will cause the subclass doc block to be missed.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.