[Puppet - Feature #14592] (Unreviewed) Puppet doc should be able to skip tests.
2012-05-19 01:07:56 GMT
Feature #14592: Puppet doc should be able to skip tests.
- Author: Ashley Penney
- Status: Unreviewed
- Priority: Low
- Assignee:
- Category:
- Target version:
- Affected Puppet version:
- Keywords:
- Branch:
As it stands I cannot just run puppet doc —mode rdoc across my entire infrastructure to produce documentation. The reason for this is that various third party modules tend to use node default {} in testing. A run in my environment gives:
Could not generate documentation: Node ‘default’ is already defined at /etc/puppet/environments/common/mcollective/tests/client.pp:1; cannot redefine at /etc/puppet/environments/common/mcollective/tests/init.pp:1
I’d like an —exclude option so I could give it /tests/ or something to ignore these. Or ideally by default it would only check those .pp’s under “manifests” or something. This would give a better experience for people relying on puppetlabs modules who are thinking about creating their own documentation. :)
I started poking through the code and couldn’t quite decide the best place to do this. I was thinking of adding an options[—manifests-only] or something in doc.rb, passing that to the util::rdoc calls and then modifying util/rdoc.rb to add an addition excludes line if that was set.
I messed around with just adding:
"--exclude", "^.*/tests/.*$",in rdoc.rb which worked fine for ignoring tests at least. I don’t have any kind of dev environment set up or I’d play with this further and try to get a proper patch. I figured I’d at least get it raised for now.
--You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To post to this group, send email to puppet-bugs <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
RSS Feed