diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3c53a0af4..8de3ce904 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,5 +2,5 @@ * @PowerShell/extension @bergmeister # Version bumps and documentation updates -Directory.Build.props @sdwheeler @michaeltlombardi +Directory.Build.props @PowerShell/extension @sdwheeler @michaeltlombardi /docs/ @PowerShell/extension @sdwheeler @michaeltlombardi diff --git a/docs/Rules/AvoidLongLines.md b/docs/Rules/AvoidLongLines.md index cc2603c51..c36daaa86 100644 --- a/docs/Rules/AvoidLongLines.md +++ b/docs/Rules/AvoidLongLines.md @@ -1,6 +1,6 @@ --- description: Avoid long lines -ms.date: 06/28/2023 +ms.date: 04/29/2025 ms.topic: reference title: AvoidLongLines --- @@ -10,10 +10,11 @@ title: AvoidLongLines ## Description -Lines should be no longer than a configured number of characters (default: 120), including leading -whitespace (indentation). +The length of lines, including leading spaces (indentation), should be less than the configured number +of characters. The default length is 120 characters. -**Note**: This rule is not enabled by default. The user needs to enable it through settings. +> [!NOTE] +> This rule isn't enabled by default. The user needs to enable it through settings. ## Configuration @@ -26,12 +27,12 @@ Rules = @{ } ``` -### Parameters +## Parameters -#### Enable: bool (Default value is `$false`) +### `Enable`: bool (Default value is `$false`) Enable or disable the rule during ScriptAnalyzer invocation. -#### MaximumLineLength: int (Default value is 120) +### `MaximumLineLength`: int (Default value is 120) Optional parameter to override the default maximum line length. diff --git a/docs/Rules/AvoidReservedWordsAsFunctionNames.md b/docs/Rules/AvoidReservedWordsAsFunctionNames.md index cfe6b92ca..769cbb85f 100644 --- a/docs/Rules/AvoidReservedWordsAsFunctionNames.md +++ b/docs/Rules/AvoidReservedWordsAsFunctionNames.md @@ -10,16 +10,15 @@ title: AvoidReservedWordsAsFunctionNames ## Description -Avoid using reserved words as function names. Using reserved words as function -names can cause errors or unexpected behavior in scripts. +Avoid using reserved words as function names. Using reserved words as function names can cause +errors or unexpected behavior in scripts. ## How to Fix -Avoid using any of the reserved words as function names. Instead, choose a -different name that is not reserved. +Avoid using any of the reserved words as function names. Choose a different name that's not a +reserved word. -See [`about_Reserved_Words`](https://learn.microsoft.com/en-gb/powershell/module/microsoft.powershell.core/about/about_reserved_words) for a list of reserved -words in PowerShell. +See [about_Reserved_Words][01] for a list of reserved words in PowerShell. ## Example @@ -39,4 +38,7 @@ function function { function myFunction { Write-Host "Hello, World!" } -``` \ No newline at end of file +``` + + +[01]: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_reserved_words diff --git a/docs/Rules/UseCorrectCasing.md b/docs/Rules/UseCorrectCasing.md index 9d7e96a18..b73df6415 100644 --- a/docs/Rules/UseCorrectCasing.md +++ b/docs/Rules/UseCorrectCasing.md @@ -11,7 +11,7 @@ title: UseCorrectCasing ## Description This is a style/formatting rule. PowerShell is case insensitive wherever possible, so the casing of -cmdlet names, parameters, keywords and operators does not matter. This rule nonetheless ensures +cmdlet names, parameters, keywords and operators doesn't matter. 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. @@ -34,23 +34,23 @@ Rules = @{ } ``` -### Parameters +## Parameters -#### Enable: bool (Default value is `$false`) +### Enable: bool (Default value is `$false`) Enable or disable the rule during ScriptAnalyzer invocation. -#### CheckCommands: bool (Default value is `$true`) +### CheckCommands: bool (Default value is `$true`) If true, require the case of all command and parameter names to match their canonical casing. -#### CheckKeyword: bool (Default value is `$true`) +### CheckKeyword: bool (Default value is `$true`) If true, require the case of all keywords to be lowercase. -#### CheckOperator: bool (Default value is `$true`) +### CheckOperator: bool (Default value is `$true`) -If true, require the case of all operators (e.g. -eq, -ne, -gt) to be lowercase. +If true, require the case of all operators to be lowercase. For example: `-eq`, `-ne`, `-gt` ## Examples