Please review pull request #38: Fix #11411 - Added section on variable formatting opened by (jamtur01)

Description:

  • Opened: Thu Dec 15 07:06:00 UTC 2011
  • Based on: puppetlabs:master (f90ead7cf566b1259bed284c6dc4f14c42363a57)
  • Requested merge: jamtur01:tickets/master/11411 (887a063be28759d17b413527dc1bfe71a17fd5bb)

Diff follows:

diff --git a/source/guides/style_guide.markdown b/source/guides/style_guide.markdown
index ce79f9f..0ba4d40 100644
--- a/source/guides/style_guide.markdown
+++ b/source/guides/style_guide.markdown
@@ -630,7 +630,24 @@ When using top-scope variables, including facts, Puppet modules should
 explicitly specify the empty namespace (i.e., `$::operatingsystem`, not
 `$operatingsystem`) to prevent accidental scoping issues.
 
-### 11.7. Display Order of Class Parameters
+### 11.7. Variable format
+
+When defining variables you should only use letters, numbers and
+underscores. You should specifically not make use of dashes.
+
+**Good:**
+
+{% highlight ruby %}
+    $foo_bar123
+{% endhighlight %}
+
+**Bad:**
+
+{% highlight ruby %}
+    $foo-bar123
+{% endhighlight %}
+
+### 11.8. Display Order of Class Parameters
 
 In parameterized class and defined resource type declarations, parameters that
 are required should be listed before optional parameters (i.e. parameters with
@@ -656,7 +673,7 @@ defaults).
     ) {}
 {% endhighlight %}
 
-### 11.8 Class parameter defaults
+### 11.9 Class parameter defaults
 
 When writing a module that accepts class parameters sane defaults SHOULD be
 provided for optional parameters to allow the end user the option of not

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to