-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# UseConsistentCasing | ||
|
||
**Severity Level: Information** | ||
|
||
## Description | ||
|
||
This is a style/formatting rule. PowerShell is case insensitive where applicable. The casing of keywords and operators does not matter but this rule ensures the use of lowercase for consistency and also because it helps distinguish keywords from commands (e.g. `foreach` is a keyword, but `ForEach-Object` is the command) and parameters (which should start with a capital letter). | ||
|
||
## How | ||
|
||
Use lowercase for language keywords and operators of the cmdlet and its parameters. | ||
|
||
## Example | ||
|
||
### Wrong | ||
|
||
``` PowerShell | ||
ForEach($file IN Get-ChildItem) { $file } | ||
``` | ||
|
||
### Correct | ||
|
||
``` PowerShell | ||
foreach($file in Get-ChildItem) { $file } | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters