Andreas Haerter
2011-Dec-14 18:14 UTC
[Puppet Users] Recommendations for comment blocks of .pp files?
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 <johndoe@example.comm> > * @link http://example.com/helpful-page > */-- Andreas <http://blog.andreas-haerter.com> O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
Andreas Haerter
2011-Dec-15 18:18 UTC
[Puppet Users] Re: Recommendations for comment blocks of .pp files?
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