Issue #14592 has been updated by eric sorenson.

Priority changed from Low to Normal
Target version set to 3.x
Keywords set to backog

Added to 3.x backlog, this needs some attention since more and more forge 
modules are using tests (good thing!).
----------------------------------------
Feature #14592: Puppet doc should be able to skip tests.
https://projects.puppetlabs.com/issues/14592#change-77643

Author: Ashley Penney
Status: Accepted
Priority: Normal
Assignee: 
Category: 
Target version: 3.x
Affected Puppet version: 
Keywords: backog
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 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.

Reply via email to