Bug #2364
No puppetdoc for subclass not preceded by resource or another subclass
| Status: | Accepted | Start date: | 06/25/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | documentation | |||
| Target version: | - | |||
| Affected Puppet version: | 2.6.0 | Branch: | ||
| Keywords: | puppetdoc | |||
| Votes: | 1 |
Description
Using 0.24.8 on Solaris 10. Consider this modules/test/manifests/init.pp:
# Test class
class test {
# Test subclass
class subclass {
}
}
puppetdoc (rdoc mode) includes both “Test class” and “Test subclass” comments in the appropriate places. However, this code:
# Test class
class test {
$foo = 1
# Test subclass
class subclass {
}
}
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.
Related issues
History
Updated by James Turnbull almost 3 years ago
- Status changed from Unreviewed to Accepted
- Assignee set to Brice Figureau
Updated by Brice Figureau almost 3 years ago
- Status changed from Accepted to In Topic Branch Pending Review
- Target version set to 0.25.0
- 3 changed from Unknown to Medium
The code is pending review, and is available in my github repository branch: tickets/master/2366: http://github.com/masterzen/puppet/tree/tickets/master/2366
Updated by Brice Figureau almost 3 years ago
- Status changed from In Topic Branch Pending Review to Ready For Checkin
- Assignee changed from Brice Figureau to James Turnbull
- % Done changed from 0 to 100
James,
The code got Luke’s approval, and is still in my github repository branch: tickets/master/2366: http://github.com/masterzen/puppet/tree/tickets/master/2366
This also contains code for #2364.
Updated by James Turnbull almost 3 years ago
- Status changed from Ready For Checkin to Closed
Pushed in commit:911b490f2288f81b36d484b40dd3d875320cf624 in branch master.
Updated by Alan Harder almost 2 years ago
- Status changed from Closed to Re-opened
- Target version deleted (
0.25.0) - % Done changed from 100 to 0
- Affected Puppet version changed from 0.24.8 to 2.6.0
This has resurfaced in 2.6.0.
Updated by Paul Berry over 1 year ago
- Target version set to 69
Since the bug resurfaced in 2.6.0, we should fix it in a 2.6 point release.
Updated by Brice Figureau over 1 year ago
Alan Harder wrote:
This has resurfaced in 2.6.0.
More precisely the first sample still works, only the second one is not working anymore. I was able to track down the issue to commit:8971d8beae2c409f9052f27c3f80ad3bdfff4de2 I’ll have a deeper look to the problem.
Updated by Alan Harder over 1 year ago
Here’s the test file I’ve been using recently:
# 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 {
}
}
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”.
Updated by James Turnbull over 1 year ago
- Status changed from Re-opened to Accepted
Updated by Nigel Kersten over 1 year ago
- Target version deleted (
69)
Updated by James Turnbull about 1 year ago
- Assignee changed from James Turnbull to Brice Figureau