Jump to: navigation, search

Difference between revisions of "Puppet/Coding style"

(Testing)
(Documentation)
Line 17: Line 17:
  
 
== Documentation ==
 
== Documentation ==
 +
* Validate all parameters are documented. They are required and lint will check it.
 +
* If possible, keep examples/*.pp updated, they are very useful for our users.
 +
* Comment your code when needed (temporary workarounds, TODO, etc).
  
 
== Asking for review ==
 
== Asking for review ==

Revision as of 03:10, 15 September 2015

Before coding

  • Read this page
  • Make sure that what you're going to code is not already work in progress
  • Make sure you're familiar with Puppet Syntax, Lint, Rspec, and Beaker
  • If you want to create a new module, read Puppet/New_module

Best practices

Testing

Your code needs to be tested. Puppet OpenStack CI will verify for you, but if you want to save time, you better to run tests locally before sending a patchː

Documentation

  • Validate all parameters are documented. They are required and lint will check it.
  • If possible, keep examples/*.pp updated, they are very useful for our users.
  • Comment your code when needed (temporary workarounds, TODO, etc).

Asking for review