Skip to content

Commit 3f571b8

Browse files
committed
Update docs to refelct that the rule is not enabeld by default
1 parent 7a82c61 commit 3f571b8

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

docs/Rules/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The PSScriptAnalyzer contains the following rule definitions.
6868
| [UseCompatibleSyntax](./UseCompatibleSyntax.md) | Warning | No | Yes |
6969
| [UseCompatibleTypes](./UseCompatibleTypes.md) | Warning | No | Yes |
7070
| [UseConsistentIndentation](./UseConsistentIndentation.md) | Warning | No | Yes |
71-
| [UseConsistentParameterSetName](./UseConsistentParameterSetName.md) | Warning | Yes | |
71+
| [UseConsistentParameterSetName](./UseConsistentParameterSetName.md) | Warning | No | |
7272
| [UseConsistentWhitespace](./UseConsistentWhitespace.md) | Warning | No | Yes |
7373
| [UseCorrectCasing](./UseCorrectCasing.md) | Information | No | Yes |
7474
| [UseDeclaredVarsMoreThanAssignments](./UseDeclaredVarsMoreThanAssignments.md) | Warning | Yes | |

docs/Rules/UseConsistentParameterSetName.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ The rule performs five different checks:
2121
4. **Case mismatch between different ParameterSetName values** - Ensures all references to the same parameter set use identical casing
2222
5. **Parameter set names containing newlines** - Warns against using newline characters in parameter set names
2323

24+
> [!NOTE]
25+
> This rule is not enabled by default. The user needs to enable it through settings.
26+
2427
## How
2528

2629
- Use a `DefaultParameterSetName` when defining multiple parameter sets
@@ -108,6 +111,22 @@ function Get-Data {
108111
}
109112
```
110113

114+
## Configuration
115+
116+
```powershell
117+
Rules = @{
118+
PSUseConsistentParameterSetName = @{
119+
Enable = $true
120+
}
121+
}
122+
```
123+
124+
### Parameters
125+
126+
- `Enable`: **bool** (Default value is `$false`)
127+
128+
Enable or disable the rule during ScriptAnalyzer invocation.
129+
111130
## Notes
112131

113132
- Parameter set names are case-sensitive in PowerShell, making this different from most other PowerShell elements

0 commit comments

Comments
 (0)