Skip to content
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

Update PSSA for 1.23 release #241

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Align assignment statement
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AlignAssignmentStatement
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Changing automatic variables might have undesired side effects
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidAssignmentToAutomaticVariable
Expand All @@ -17,6 +16,11 @@ only be assigned in certain special cases to achieve a certain effect as a speci

To understand more about automatic variables, see `Get-Help about_Automatic_Variables`.

<!-- TODO
Ability to suppress was added in https://github.com/PowerShell/PSScriptAnalyzer/pull/1896
Need documentation for how to configure suppression of this rule.
-->

## How

Use variable names in functions or their parameters that do not conflict with automatic variables.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid Default Value For Mandatory Parameter
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidDefaultValueForMandatoryParameter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Switch Parameters Should Not Default To True
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidDefaultValueSwitchParameter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid exclaim operator
ms.custom: PSSA v1.22.1
ms.date: 03/26/2024
ms.topic: reference
title: AvoidExclaimOperator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid global aliases.
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidGlobalAliases
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid global functions and aliases
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidGlobalFunctions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: No Global Variables
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidGlobalVars
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid Invoking Empty Members
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidInvokingEmptyMembers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid long lines
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidLongLines
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid multiple type specifiers on parameters.
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidMultipleTypeAttributes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid using null or empty HelpMessage parameter attribute.
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidNullOrEmptyHelpMessageAttribute
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid overwriting built in cmdlets
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidOverwritingBuiltInCmdlets
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid semicolons as line terminators
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidSemicolonsAsLineTerminators
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid Using ShouldContinue Without Boolean Force Parameter
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidShouldContinueWithoutForce
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid trailing whitespace
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidTrailingWhitespace
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid sending credentials and secrets over unencrypted connections
ms.custom: PSSA v1.22.1
ms.date: 02/28/2024
ms.topic: reference
title: AvoidUsingAllowUnencryptedAuthentication
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid using broken hash algorithms
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidUsingBrokenHashAlgorithms
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix.
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidUsingCmdletAliases
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid Using ComputerName Hardcoded
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidUsingComputerNameHardcoded
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid Using SecureString With Plain Text
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidUsingConvertToSecureStringWithPlainText
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid Using Deprecated Manifest Fields
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidUsingDeprecatedManifestFields
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid using double quotes if the string is constant.
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidUsingDoubleQuotesForConstantString
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid Using Empty Catch Block
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidUsingEmptyCatchBlock
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid Using Invoke-Expression
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidUsingInvokeExpression
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid Using Plain Text For Password Parameter
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidUsingPlainTextForPassword
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid Using Positional Parameters
ms.custom: PSSA v1.22.1
ms.date: 02/13/2024
ms.topic: reference
title: AvoidUsingPositionalParameters
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid Using Username and Password Parameters
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidUsingUsernameAndPasswordParams
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid Using Get-WMIObject, Remove-WMIObject, Invoke-WmiMethod, Register-WmiEvent, Set-WmiInstance
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidUsingWMICmdlet
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Avoid Using Write-Host
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: AvoidUsingWriteHost
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: DSC examples are present
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: DSCDscExamplesPresent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Dsc tests are present
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: DSCDscTestsPresent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Return Correct Types For DSC Functions
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: DSCReturnCorrectTypesForDSCFunctions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Use Standard Get/Set/Test TargetResource functions in DSC Resource
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: DSCStandardDSCFunctionsInResource
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Use identical mandatory parameters for DSC Get/Test/Set TargetResource functions
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: DSCUseIdenticalMandatoryParametersForDSC
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Use Identical Parameters For DSC Test and Set Functions
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: DSCUseIdenticalParametersForDSC
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Use verbose message in DSC resource
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: DSCUseVerboseMessageInDSCResource
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Misleading Backtick
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: MisleadingBacktick
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Module Manifest Fields
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: MissingModuleManifestField
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Place close braces
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: PlaceCloseBrace
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Place open braces consistently
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: PlaceOpenBrace
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Null Comparison
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: PossibleIncorrectComparisonWithNull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Equal sign is not an assignment operator. Did you mean the equality operator \'-eq\'?
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: PossibleIncorrectUsageOfAssignmentOperator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: \'>\' is not a comparison operator. Use \'-gt\' (greater than) or \'-ge\' (greater or equal).
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: PossibleIncorrectUsageOfRedirectionOperator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Basic Comment Help
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: ProvideCommentHelp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: List of PSScriptAnalyzer rules
ms.custom: PSSA v1.22.1
ms.date: 03/27/2024
ms.topic: reference
title: List of PSScriptAnalyzer rules
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Reserved Cmdlet Chars
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: ReservedCmdletChar
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Reserved Parameters
ms.custom: PSSA v1.22.1
ms.date: 03/06/2024
ms.topic: reference
title: ReservedParams
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: ReviewUnusedParameter
ms.custom: PSSA v1.22.1
ms.date: 03/26/2024
ms.topic: reference
title: ReviewUnusedParameter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Should Process
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: ShouldProcess
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Cmdlet Verbs
ms.custom: PSSA v1.22.1
ms.date: 03/26/2024
ms.topic: reference
title: UseApprovedVerbs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Use BOM encoding for non-ASCII files
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: UseBOMForUnicodeEncodedFile
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Use Cmdlet Correctly
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: UseCmdletCorrectly
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
description: Use compatible cmdlets
ms.custom: PSSA v1.22.1
ms.date: 06/28/2023
ms.topic: reference
title: UseCompatibleCmdlets
Expand Down
Loading