From 38931dc0388b01ef915aa4fd0e1865352c0a3cf2 Mon Sep 17 00:00:00 2001 From: HRXN Date: Wed, 27 Mar 2024 14:54:31 +0100 Subject: [PATCH] Missing configurable property in `README.md`; Fix rule name, param name, (#213) and example in `UseSingularNouns.md` --- .../PSScriptAnalyzer/Rules/README.md | 6 +++--- .../PSScriptAnalyzer/Rules/UseSingularNouns.md | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/README.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/README.md index b5761ac..4f0d24e 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/README.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/README.md @@ -1,7 +1,7 @@ --- description: List of PSScriptAnalyzer rules ms.custom: PSSA v1.22.0 -ms.date: 02/13/2024 +ms.date: 03/27/2024 ms.topic: reference title: List of PSScriptAnalyzer rules --- @@ -58,7 +58,7 @@ The PSScriptAnalyzer contains the following rule definitions. | [ProvideCommentHelp](./ProvideCommentHelp.md) | Information | Yes | Yes | | [ReservedCmdletChar](./ReservedCmdletChar.md) | Error | Yes | | | [ReservedParams](./ReservedParams.md) | Error | Yes | | -| [ReviewUnusedParameter](./ReviewUnusedParameter.md) | Warning | Yes | | +| [ReviewUnusedParameter](./ReviewUnusedParameter.md) | Warning | Yes | Yes2 | | [ShouldProcess](./ShouldProcess.md) | Warning | Yes | | | [UseApprovedVerbs](./UseApprovedVerbs.md) | Warning | Yes | | | [UseBOMForUnicodeEncodedFile](./UseBOMForUnicodeEncodedFile.md) | Warning | Yes | | @@ -84,5 +84,5 @@ The PSScriptAnalyzer contains the following rule definitions. - 1 Rule is not available on all PowerShell versions, editions, or OS platforms. See the rule's documentation for details. -- 2 The rule a configurable property, but the rule can't be disabled like other +- 2 The rule has a configurable property, but the rule can't be disabled like other configurable rules. diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseSingularNouns.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseSingularNouns.md index cde3b70..b7bba39 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseSingularNouns.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseSingularNouns.md @@ -1,7 +1,7 @@ --- description: Cmdlet Singular Noun ms.custom: PSSA v1.22.0 -ms.date: 03/26/2024 +ms.date: 03/27/2024 ms.topic: reference title: UseSingularNouns --- @@ -25,24 +25,24 @@ function Get-Elements { ```powershell Rules = @{ - UseSingularNouns = @{ - NounAllowList = 'Data', 'Windows', 'Foos' + PSUseSingularNouns = @{ Enable = $true + NounAllowList = 'Data', 'Windows', 'Foos' } } ``` ### Parameters -- `UseSingularNouns`: `string[]` (Default value is `{'Data', 'Windows'}`) - - Commands to be excluded from this rule. `Data` and `Windows` are common false positives and are - excluded by default. - - `Enable`: `bool` (Default value is `$true`) Enable or disable the rule during ScriptAnalyzer invocation. +- `NounAllowList`: `string[]` (Default value is `{'Data', 'Windows'}`) + + Commands to be excluded from this rule. `Data` and `Windows` are common false positives and are + excluded by default. + ## How Change plurals to singular.