Skip to content

Commit

Permalink
Merge pull request #15 from puppetlabs/CAT-1841-Update_class_structur…
Browse files Browse the repository at this point in the history
…e_documentation

(CAT-1841) Update docs with current structures
  • Loading branch information
LukasAud authored May 15, 2024
2 parents cc2704e + 3f1ca12 commit 0246ca5
Showing 1 changed file with 43 additions and 2 deletions.
45 changes: 43 additions & 2 deletions style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,51 @@ Manifests:


- Should not exceed a 140-character line width, except where such a limit would be impractical.

- May align hash rockets \(`=>`\) within blocks of attributes, one space after the longest resource key, arranging hashes for maximum readability first.
- Should not leave any empty lines between class declaration and the first declared resource.
- Should leave one empty line between resources, except when using dependency chains.

- May align hash rockets \(`=>`\) within blocks of attributes, one space after the longest resource key, arranging hashes for maximum readability first.
Good:

```
class ntp::install {
package { $ntp::package_name:
...
}
exec {
...
}
}
```

Bad: Empty line after class declaration:

```
class ntp::install {
package { $ntp::package_name:
...
}
exec {
...
}
}
```

Bad: No empty line between resource declarations:

```
class ntp::install {
package { $ntp::package_name:
...
}
exec {
...
}
}
```


### Arrays and hashes
Expand Down

0 comments on commit 0246ca5

Please sign in to comment.