Skip to content

Document new optional parameters added to UseCorrectCasing in #1704 #2086

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/Rules/UseCorrectCasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,35 @@ This rule nonetheless ensures consistent casing for clarity and readability.
Using lowercase keywords helps distinguish them from commands.
Using lowercase operators helps distinguish them from parameters.

## Configuration

```powershell
Rules = @{
PS UseCorrectCasing = @{
Enable = $true
CheckCommands = $true
CheckKeyword = $true
CheckOperator = $true
}
}
```

### Enable: bool (Default value is `$false`)

Enable or disable the rule during ScriptAnalyzer invocation.

### CheckCommands: bool (Default value is `$true`)

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

### CheckKeyword: bool (Default value is `$true`)

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

### CheckOperator: bool (Default value is `$true`)

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

## How

Use exact casing for type names.
Expand Down