Skip to content

Commit ca30e30

Browse files
authored
Fix severat typos
Merge pull request #124 from Calinou/fix-typos
2 parents 7a5b132 + 242bc0d commit ca30e30

File tree

6 files changed

+16
-17
lines changed

6 files changed

+16
-17
lines changed

Best-Practices/Performance.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,4 @@ This example reverts back to a native PowerShell approach, using commands and pa
6565

6666
You will generally find that it is possible to conform with the community's general aesthetic preferences while still maintaining a good level of performance. Doing so may require more work - such as writing PowerShell wrapper commands around underlying .NET Framework classes. Most would argue that, for a tool that is intended for long-term use, the additional work is a worthwhile investment.
6767

68-
The moral here is that both aesthetic and performance are important considerations, and without some work context, neither is inherently more important than the other. It is often possible, with the right technique, to satisfy both. As a general practice, you should avoid giving up on aesthetics solely because of performance concesrns - when possible, make the effort to satisfy both performance and aesthetics.
69-
68+
The moral here is that both aesthetic and performance are important considerations, and without some work context, neither is inherently more important than the other. It is often possible, with the right technique, to satisfy both. As a general practice, you should avoid giving up on aesthetics solely because of performance concerns - when possible, make the effort to satisfy both performance and aesthetics.

Best-Practices/TODO.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ My choice: Configuration module. Otherwise, use clixml (or XAML) to persist to A
246246
#### Provide aliases in your modules
247247
You should feel free to create and use aliases within your modules. In some cases, you can even improve readability by using an alias without the verb, or shortening command names.
248248

249-
For exported aliases, follow the guidance of Microsoft ("ip" for import, "s" for set, "g" for get, "r" for remove, etc.), make up somethign for your nouns.
249+
For exported aliases, follow the guidance of Microsoft ("ip" for import, "s" for set, "g" for get, "r" for remove, etc.), make up something for your nouns.
250250

251251
Use `New-Alias ... -ErrorAction SilentlyContinue` to avoid overwriting existing aliases.
252252

@@ -293,7 +293,7 @@ Additionally, avoid using `[string]` with ParameterSets because anything can be
293293

294294
When passing on parameters to another command, you should be _at least_ as strongly typed as the other command, to avoid casting exceptions within your script.
295295

296-
One notable exception is when you could accept more than one type. In PowerShell you can speficy parameter set overloads, but you can't change the type of a parameter.
296+
One notable exception is when you could accept more than one type. In PowerShell you can specify parameter set overloads, but you can't change the type of a parameter.
297297

298298

299299
### Don't reinvent the wheel

LICENSE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This work is licensed under a [Creative Commons Attribution-ShareAlike 4.0 Inter
88

99
**Adapt** — remix, transform, and build upon the material
1010

11-
The authors encourage you to redistribute this content as widely as possible, but require that you give credit to the primary authors below, and that you notify us on github of any improvements you make.
11+
The authors encourage you to redistribute this content as widely as possible, but require that you give credit to the primary authors below, and that you notify us on GitHub of any improvements you make.
1212

1313

1414
#### Credits
@@ -29,6 +29,6 @@ Portions copyright (c) Joel Bennett, 2015
2929

3030
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)
3131

32-
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.
32+
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 surprised if over then next few weeks we change rules to contradict what they say at this current moment.
3333

3434
<p align="center"><a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/" style="display: inline-block; float: left; vertical-align: middle; margin: 10px;"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a></p>

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This work is licensed under a [Creative Commons Attribution-ShareAlike 4.0 Inter
1212

1313
**Adapt** — remix, transform, and build upon the material
1414

15-
The authors encourage you to redistribute this content as widely as possible, but require that you give credit to the primary authors below, and that you notify us on github of any improvements you make.
15+
The authors encourage you to redistribute this content as widely as possible, but require that you give credit to the primary authors below, and that you notify us on GitHub of any improvements you make.
1616

1717
### What are Best Practices
1818

@@ -52,7 +52,7 @@ Remember [what we mean by _Best Practices_](#what-are-best-practices)
5252

5353
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)
5454

55-
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.
55+
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.
5656

5757
#### Contributing
5858

Style-Guide/Code-Layout-and-Formatting.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ If you wish, you may use camelCase for variables within your functions (or modul
6969

7070
#### One True Brace Style
7171

72-
This guide recommends the so-called ["One True Brace Style" variant to K&R](https://github.com/PoshCode/PowerShellPracticeAndStyle/issues/81#issuecomment-285835313), which requires that every braceable _statement_ should have the opening brace on the _end of a line_, and the closing brace at the _beginning of a line_.
72+
This guide recommends the so-called ["One True Brace Style" variant to K&R](https://github.com/PoshCode/PowerShellPracticeAndStyle/issues/81#issuecomment-285835313), which requires that every braceable _statement_ should have the opening brace on the _end of a line_, and the closing brace at the _beginning of a line_.
7373

7474
There is one notable exception when passing small scriptblocks to parameters (where K&R would allow leaving off the braces entirely), we allow putting the entire statement on a single line.
7575

7676
```powershell
7777
enum Color {
78-
Black,
78+
Black,
7979
White
8080
}
8181
@@ -88,7 +88,7 @@ function Test-Code {
8888
if (10 -gt $ParameterOne) {
8989
"Greater"
9090
} else {
91-
"Lesser"
91+
"Lesser"
9292
}
9393
}
9494
}
@@ -151,11 +151,11 @@ function Test-Code {
151151

152152
Limit lines to 115 characters when possible.
153153

154-
Keeping lines to a small width allows scripts to be read in _one_ direction (top to bottom) without scrolling back-and-forth horizontally. What, exactly, this width should be is a one of the favorite arguing points among developers on the internet (more splintered than emacs vs vi or gnu GPL vs MIT).
154+
Keeping lines to a small width allows scripts to be read in _one_ direction (top to bottom) without scrolling back-and-forth horizontally. What, exactly, this width should be is a one of the favorite arguing points among developers on the internet (more splintered than emacs vs vi or gnu GPL vs MIT).
155155

156156
In this guide we use two particular sources for the maximum line width:
157157

158-
The PowerShell console is, by default, 120 characters wide, but it allows only 119 characters on output lines, and when entering multi-line text, PowerShell uses a line continuation prompt: `>>> ` and thus limits your line length to 116 anyway.
158+
The PowerShell console is, by default, 120 characters wide, but it allows only 119 characters on output lines, and when entering multi-line text, PowerShell uses a line continuation prompt: `>>> ` and thus limits your line length to 116 anyway.
159159

160160
Github's current maximum line width varies between 121 and 126 depending on your browser and OS (and thus, font). However, the 115 line length suggested by PowerShell would be enough to even allow side-by-side diffs to be displayed without scrolling or wrapping on the current "standard" 1080p monitor.
161161

@@ -175,7 +175,7 @@ Surround function and class definitions with _two_ blank lines.
175175

176176
Method definitions within a class are surrounded by a single blank line.
177177

178-
Blank lines may be ommitted between a bunch of related one-liners (e.g. empty functions)
178+
Blank lines may be omitted between a bunch of related one-liners (e.g. empty functions)
179179

180180
Additional blank lines may be used sparingly to separate groups of related functions, or within functions to indicate logical sections (e.g. before a block comment).
181181

@@ -220,7 +220,7 @@ $yesterdaysDate = (Get-Date).AddDays(-$i)
220220

221221
#### Spaces around special characters
222222

223-
White-space is (mostly) irrelevant to PowerShell, but its proper use is key to writing easily readable code.
223+
White-space is (mostly) irrelevant to PowerShell, but its proper use is key to writing easily readable code.
224224

225225
Use a single space after commas and semicolons, and around pairs of curly braces.
226226

@@ -241,7 +241,7 @@ Obviously, these rules should not be applied in such a way as to affect output.
241241

242242
PowerShell will not complain about extra semicolons, but they are unnecessary, and can get in the way when code is being edited or copy-pasted. They also result in extra do-nothing edits in source control when someone finally decides to delete them.
243243

244-
They are also unecessary when declaring hashtables if you are already putting each element on it's own line:
244+
They are also unnecessary when declaring hashtables if you are already putting each element on its own line:
245245

246246
```PowerShell
247247
# This is the preferred way to declare a hashtable if it extends past one line:

Style-Guide/Documentation-and-Comments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Comments that contradict the code are worse than no comments. Always make a priority of keeping the comments up-to-date when the code changes!
44

5-
Comments should be in English, and should be complete sentences. If the comment is short, the period at the end can be ommited.
5+
Comments should be in English, and should be complete sentences. If the comment is short, the period at the end can be omitted.
66

77
Remember that comments should serve to your reasoning and decision-making, not attempt to explain what a command does. With the exception of regular expressions, well-written PowerShell can be pretty self-explanatory.
88

0 commit comments

Comments
 (0)