diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9db3ae4..719e032 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,20 +20,20 @@ The *PowerShell Best Practices* are always evolving, and continue to be edited a To repeat from the ReadMe, the guidelines are divided into these sections: -* Style Guide - * Code Layout and Formatting - * Function Structure - * Documentation and Commenting - * Readability - * Naming Conventions -* Best Practices - * Naming Conventions - * Building Reusable Tools - * Output and Formatting - * Error Handling - * Performance - * Language, Interop and .Net - * Metadata, Versioning, and Packaging +* [Style Guide (Introduction)](Style%20Guide/Introduction.md) + * [Code Layout and Formatting](Style%20Guide/Code%20Layout%20and%20Formatting.md) + * [Function Structure](Style%20Guide/Function%20Structure.md) + * [Documentation and Comments](Style%20Guide/Documentation%20and%20Comments.md) + * [Readability](Style%20Guide/Readability.md) + * [Naming Conventions](Style%20Guide/Naming%20Conventions.md) +* [Best Practices (Introduction)](Best%20Practices/Introduction.md) + * [Building Reusable Tools](Best%20Practices/Building%20Reusable%20Tools.md) + * [Output and Formatting](Best%20Practices/Output%20and%20Formatting.md) + * [Error Handling](Best%20Practices/Error%20Handling.md) + * [Performance](Best%20Practices/Performance.md) + * [Language, Interop and .Net](Best%20Practices/Language%2C%20Interop%20and%20.Net.md) + * [Naming Conventions](Best%20Practices/Naming%20Conventions.md) + * [Metadata, Versioning, and Packaging](Best%20Practices/Metadata%2C%20Versioning%2C%20and%20Packaging.md) Markdown documents on GitHub support linking within a document, but only to headers, so when editing, in addition to keeping practices and guidelines in the documents where they make sense, please use headlines for each guideline, and lower level headlines for rationale, examples, counter examples, and exceptions. @@ -43,4 +43,6 @@ In general, practices and guidelines should be at least a header with an explana Style guidelines in particular should be phrased as a prescriptive guideline telling people what to do rather than a proscriptive or prohibiting rule, and should have both examples and counter examples. -When you absolutely must write a negative rule, you should start with the phrase "avoid" and end with an "instead" sentence, like:
Avoid the use of `~` to represent the home folder.

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`

+When you absolutely must write a negative rule, you should start with the phrase "avoid" and end with an "instead" sentence, like: +> ###### Avoid the use of `~` to represent the home folder. +> 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` diff --git a/LICENSE.md b/LICENSE.md index 33cfc29..31ba7a1 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -27,7 +27,7 @@ Portions copyright (c) Joel Bennett, 2015 #### NOTE -The *PowerShell Best Practices* are always evolving, and continue to be edited and updated as the language and tools (and our community understanding of them) evolve. We encourage you to check back for new editions at least twice a year, by visiting https://github.com/PoshCode/PowerShellPracticeAndStyle +The *PowerShell Best Practices* are always evolving, and continue to be edited and updated as the language and tools (and our community understanding of them) evolve. We encourage you to check back for new editions at least twice a year, by visiting [https://github.com/PoshCode/PowerShellPracticeAndStyle](https://github.com/PoshCode/PowerShellPracticeAndStyle) The *PowerShell Style Guide* in particular is in PREVIEW, and we are still actively working out our disagreements about the rules in the guide through the github issues system. Please don't be suprised if over then next few weeks we change rules to contradict what they say at this current moment. diff --git a/README.md b/README.md index d065c7b..a3a4e3d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

Creative Commons License

-This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License, please attribute to Don Jones, Matt Penny, Carlos Perez, Joel Bennett and the PowerShell Community. +This work is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/), please attribute to Don Jones, Matt Penny, Carlos Perez, Joel Bennett and the PowerShell Community. ###### You are free to: @@ -49,7 +49,7 @@ The guidelines are divided into these sections: Remember [what we mean by _Best Practices_](#what-are-best-practices) -The *PowerShell Best Practices* are always evolving, and continue to be edited and updated as the language and tools (and our community understanding of them) evolve. We encourage you to check back for new editions at least twice a year, by visiting https://github.com/PoshCode/PowerShellPracticeAndStyle +The *PowerShell Best Practices* are always evolving, and continue to be edited and updated as the language and tools (and our community understanding of them) evolve. We encourage you to check back for new editions at least twice a year, by visiting [https://github.com/PoshCode/PowerShellPracticeAndStyle](https://github.com/PoshCode/PowerShellPracticeAndStyle) The *PowerShell Style Guide* in particular is in PREVIEW, and we are still actively working out our disagreements about the rules in the guide through the github issues system. diff --git a/TableOfContents.md b/TableOfContents.md index ad0cd11..832f5ef 100644 --- a/TableOfContents.md +++ b/TableOfContents.md @@ -1,19 +1,19 @@ PowerShell Practice and Style Guide =================================== -[Introduction (ReadMe)](ReadMe.md) +[Introduction (ReadMe)](README.md) -* [Style Guide (Introduction)](Style Guide/Introduction.md) - * [Code Layout and Formatting](Style Guide/Code Layout and Formatting.md) - * [Function Structure](Style Guide/Function Structure.md) - * [Documentation and Comments](Style Guide/Documentation and Comments.md) - * [Readability](Style Guide/Readability.md) - * [Naming Conventions](Style Guide/Naming Conventions.md) -* [Best Practices (Introduction)](Best Practices/Introduction.md) - * [Building Reusable Tools](Best Practices/Building Reusable Tools.md) - * [Output and Formatting](Best Practices/Output and Formatting.md) - * [Error Handling](Best Practices/Error Handling.md) - * [Performance](Best Practices/Performance.md) - * [Language, Interop and .Net](Best Practices/Language%2C Interop and .Net.md) - * [Naming Conventions](Best Practices/Naming Conventions.md) - * [Metadata, Versioning, and Packaging](Best Practices/Metadata%2C Versioning%2C and Packaging.md) \ No newline at end of file +* [Style Guide (Introduction)](Style%20Guide/Introduction.md) + * [Code Layout and Formatting](Style%20Guide/Code%20Layout%20and%20Formatting.md) + * [Function Structure](Style%20Guide/Function%20Structure.md) + * [Documentation and Comments](Style%20Guide/Documentation%20and%20Comments.md) + * [Readability](Style%20Guide/Readability.md) + * [Naming Conventions](Style%20Guide/Naming%20Conventions.md) +* [Best Practices (Introduction)](Best%20Practices/Introduction.md) + * [Building Reusable Tools](Best%20Practices/Building%20Reusable%20Tools.md) + * [Output and Formatting](Best%20Practices/Output%20and%20Formatting.md) + * [Error Handling](Best%20Practices/Error%20Handling.md) + * [Performance](Best%20Practices/Performance.md) + * [Language, Interop and .Net](Best%20Practices/Language%2C%20Interop%20and%20.Net.md) + * [Naming Conventions](Best%20Practices/Naming%20Conventions.md) + * [Metadata, Versioning, and Packaging](Best%20Practices/Metadata%2C%20Versioning%2C%20and%20Packaging.md) \ No newline at end of file