Re: Recommendations for comment blocks of .pp files?

65 views
Skip to first unread message

Andreas Haerter

unread,
Dec 15, 2011, 1:18:24 PM12/15/11
to puppet...@googlegroups.com
On 14.12.2011 19:14, Andreas Haerter wrote:
> I'm asking because there might be some kind of standard and/or tools to
> parse the source code of .pp files to generate Docs for the puppet
> modules I'm going to write.

Ok, got my question answered on IRC. If you have Rdoc-formatted text
blocks before your classes, you can use the "puppet doc" tool to
generate HTML documentation.

The Wiki provides some information:
<http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Manifest_Documentation>

--
Andreas <http://blog.andreas-haerter.com>

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

signature.asc

Andreas Haerter

unread,
Dec 14, 2011, 1:14:24 PM12/14/11
to puppet...@googlegroups.com
Hi *,

I'm new to puppet. Before writing and modifying tons of source code to
get my environment up and running, it would be nice to hear if there are
any recommendations regarding the format of

a) comment blocks to document classes and files
b) comment blocks to document other stuff (e.g. defines)
c) "#" vs "/* */" for multi-line comments

I'm asking because there might be some kind of standard and/or tools to
parse the source code of .pp files to generate Docs for the puppet
modules I'm going to write.

Or is RDoc[1] the format one would use (because Puppet is written in
Ruby)? If so, are there any existing RDoc comment header
templates/examples to get a quick start?

Thanks

[1]<http://en.wikipedia.org/wiki/RDoc>

**tl;dr** Is there something like like PHPDoc/JavaDoc-DocBlocks for
puppet .pp manifest files? Example:

> /**
> * Foobar
> *
> * yadda yadda yadda
> *
> * @license GPLv2 (http://www.gnu.org/licenses/gpl2.html)
> * @author John Doe <joh...@example.comm>
> * @link http://example.com/helpful-page
> */

signature.asc
Reply all
Reply to author
Forward
0 new messages