Skip to content

Commit 9ca0693

Browse files
committed
Add configuration instructions (again)
1 parent 4b4a136 commit 9ca0693

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

docs/Rules/UseCorrectCasing.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Use exact casing of cmdlet/function/parameter name.
3-
ms.date: 06/28/2023
3+
ms.date: 03/19/2025
44
ms.topic: reference
55
title: UseCorrectCasing
66
---
@@ -10,10 +10,16 @@ title: UseCorrectCasing
1010

1111
## Description
1212

13-
This is a style formatting rule. PowerShell is case insensitive where applicable. The casing of
14-
cmdlet names or parameters does not matter but this rule ensures that the casing matches for
15-
consistency and also because most cmdlets/parameters start with an upper case and using that
16-
improves readability to the human eye.
13+
This is a style/formatting rule. PowerShell is case insensitive wherever possible, so the casing of
14+
cmdlet names, parameters, keywords and operators does not matter. This rule nonetheless ensures
15+
consistent casing for clarity and readability. Using lowercase keywords helps distinguish them from
16+
commands. Using lowercase operators helps distinguish them from parameters.
17+
18+
## How
19+
20+
- Use exact casing for type names.
21+
- Use exact casing of the cmdlet and its parameters.
22+
- Use lowercase for language keywords and operators.
1723

1824
## Configuration
1925

@@ -28,36 +34,33 @@ Rules = @{
2834
}
2935
```
3036

31-
### Enable: bool (Default value is `$false`)
37+
### Parameters
38+
39+
#### Enable: bool (Default value is `$false`)
3240

3341
Enable or disable the rule during ScriptAnalyzer invocation.
3442

35-
### CheckCommands: bool (Default value is `$true`)
43+
#### CheckCommands: bool (Default value is `$true`)
3644

3745
If true, require the case of all operators to be lowercase.
3846

39-
### CheckKeyword: bool (Default value is `$true`)
47+
#### CheckKeyword: bool (Default value is `$true`)
4048

4149
If true, require the case of all keywords to be lowercase.
4250

43-
### CheckOperator: bool (Default value is `$true`)
51+
#### CheckOperator: bool (Default value is `$true`)
4452

4553
If true, require the case of all commands to match their actual casing.
4654

47-
## How
48-
49-
Use exact casing of the cmdlet and its parameters, e.g.
50-
`Invoke-Command { 'foo' } -RunAsAdministrator`.
51-
52-
## Example
55+
## Examples
5356

54-
### Wrong
57+
### Wrong way
5558

5659
```powershell
5760
invoke-command { 'foo' } -runasadministrator
5861
```
5962

60-
### Correct
63+
### Correct way
6164

6265
```powershell
6366
Invoke-Command { 'foo' } -RunAsAdministrator

0 commit comments

Comments
 (0)