The Community PowerShell Style Guide
Markdown documents on GitHub support linking to any header, so when editing, please observe the following conventions:
- Keep rules within the section where they make sense.
- Sections must be header level 3 (have three hashes):
### Naming Conventions
- Rules must be headers with an explanatory paragraph
- Rules should have examples and counter examples
- Rules should be phrased as the positive, rather than the negative.
- Don't say: "Avoid using aliases"
- Do say: "Use full command names"
- When writing a negative rule, you should always start with "avoid" and end with an "instead" sentence, like:
The meaning of ~ is unfortunately dependent on the "current" provider at the time of execution. This isn't really a style issue, but it's an important rule for code you intend to share anyway. Instead, use
${Env:UserProfile}
or(Get-PSProvider FileSystem).Home