Skip to content

Commit bd7ce40

Browse files
committed
Address Copilot feedback
1 parent 54055c0 commit bd7ce40

9 files changed

Lines changed: 12 additions & 18 deletions

docs/Rules/AvoidDefaultValueSwitchParameter.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ function Test-Script
6060
$Switch
6161
)
6262
63-
begin {
64-
# Ensure that the $Switch is set to false if not provided
65-
if (-not $PSBoundParameters.ContainsKey('Switch')) {
66-
$Switch = $false
67-
}
68-
}
69-
...
7063
}
7164
```
7265

docs/Rules/AvoidOverwritingBuiltInCmdlets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ against.
7070

7171
> [!NOTE]
7272
> The default value for `PowerShellVersion` is `core-7.0.0-windows` if PowerShell 7 or later is
73-
installed, and `desktop-5.1.17763.316-windows` if it's not.
73+
> installed, and `desktop-5.1.17763.316-windows` if it's not.
7474
7575
Patched PowerShell releases usually share the same cmdlet metadata, so the built-in allow lists are
7676
provided by major and minor version. You can also generate a custom allow list with

docs/Rules/MissingModuleManifestField.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ title: MissingModuleManifestField
1010

1111
## Description
1212

13-
This rule detects when a module manifest is missing required fields. A module manifest is a `.psd1`
13+
This rule detects when a module manifest is missing a required field. A module manifest is a `.psd1`
1414
file that contains a hash table. The keys and values in the hash table describe the contents and
1515
attributes of the module, define the prerequisites, and determine how the components are processed.
1616

17-
A module manifest must contain the following key (and a corresponding value) to be considered valid:
17+
A module manifest must contain the following key-value pair to be considered valid:
1818

1919
- `ModuleVersion`
2020

docs/Rules/PossibleIncorrectUsageOfAssignmentOperator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Use equality operator (==) instead of an equal sign (=) as an assignment operator
2+
description: Use equality operator (-eq) instead of an equal signs
33
ms.date: 06/05/2026
44
ms.topic: reference
55
title: PossibleIncorrectUsageOfAssignmentOperator

docs/Rules/ReviewUnusedParameter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ title: ReviewUnusedParameter
1010

1111
## Description
1212

13-
This rule detects parameters that are declared but not used a script, scriptblock, or function
13+
This rule detects parameters that are declared but not used in a script, scriptblock, or function
1414
scope. You should consider removing unused parameters to improve code clarity and reduce confusion
1515
about your function's dependencies.
1616

docs/Rules/UseCompatibleCmdlets.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ configuration:
3434
@{
3535
'Rules' = @{
3636
'PSUseCompatibleCmdlets' = @{
37-
'Compatibility' = @('core-6.1.0-windows')
37+
'compatibility' = @('core-6.1.0-windows')
3838
}
3939
}
4040
}
4141
```
4242

43-
The **Compatibility** parameter accepts a list of one or more target identifiers, such as:
43+
The **compatibility** parameter accepts a list of one or more target identifiers, such as:
4444

4545
- desktop-2.0-windows
4646
- desktop-3.0-windows
@@ -56,7 +56,7 @@ minor version profiles.
5656

5757
You can also create a custom profile with [New-CommandDataFile.ps1][01]. Place the generated JSON
5858
file in the `Settings` folder of the `PSScriptAnalyzer` module. Then you can reference that file by
59-
name under `Compatibility`.
59+
name under `compatibility`.
6060

6161
The `core-6.0.2-*` files were removed in PSScriptAnalyzer 1.18 because PowerShell 6.0 reached its
6262
end of life.

docs/Rules/UseCompatibleCommands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ title: UseCompatibleCommands
1212

1313
This rule detects commands that aren't available on your targeted PowerShell platform.
1414

15-
A name in the PowerShell platform is identified in the following format:
15+
PowerShell platform names use the following format:
1616

1717
```
1818
<os-name>_<os-arch>_<os-version>_<ps-version>_<ps-arch>_<dotnet-version>_<dotnet-edition>

docs/Rules/UseCompatibleTypes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ title: UseCompatibleTypes
1212

1313
This rule detects types that aren't available by default on your targeted PowerShell platforms.
1414

15-
A name in the PowerShell platform is identified in the following format:
15+
PowerShell platform names use the following format:
1616

1717
```
1818
<os-name>_<os-arch>_<os-version>_<ps-version>_<ps-arch>_<dotnet-version>_<dotnet-edition>

docs/Rules/UseToExportFieldsInManifest.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ following entries:
2020
- `VariablesToExport`
2121

2222
When you use wildcards or null, PowerShell performs expensive analysis of your module during
23-
autodiscovery. Instead, use an explicit list of items to export.
23+
autodiscovery. Instead, use an explicit list of items to export. If you have no items to export, use
24+
an empty array (`@()`) instead of null or a wildcard.
2425

2526
## Example
2627

0 commit comments

Comments
 (0)