Skip to content

Commit

Permalink
Fix typos in Pester.BuildAnalyzerRules (#2305)
Browse files Browse the repository at this point in the history
  • Loading branch information
fflaten authored Mar 31, 2023
1 parent 7f2b369 commit 14ddff4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Pester.BuildAnalyzerRules/Pester.BuildAnalyzerRules.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Should be replaced with the following line when PSScriptAnalyzer is fixed. See Invoke-Pester
# [Diagnostics.CodeAnalysis.SuppressMessageAttribute('Pester.BuildAnalyzerRules\Measure-SafeCommands', 'Remove-Variable')]
$IgnoreUnsafeCommands = @('Remove-Variable', 'Write-PesterDebugMessage')
# Hardcoding SafeCommands-entries to avoid dependency on imported module and slow PSSA-performance when execution Pester.SafeCommands.ps1 (due to many reimports by PSSA).
# Hardcoding SafeCommands-entries to avoid dependency on imported module and slow PSSA-performance when executing Pester.SafeCommands.ps1 (due to many reimports by PSSA).
# Consider making build.ps1 update this
$SafeCommands = [System.IO.File]::ReadAllLines([System.IO.Path]::Join($PSScriptRoot,'SafeCommands.txt'))

Expand All @@ -11,7 +11,7 @@ function Measure-SafeCommands {
.SYNOPSIS
Should use $SafeCommand-variant of external function when available.
.DESCRIPTION
Pester module defines a $SafeCommands dictionary for external commands to avoid hijacking. To fix a violation of this rule, update the call to use SafeCommands variant, ex. `& $SafeCommands['CommandName'] -Param1 Value1`.
Pester module defines a $SafeCommands dictionary for external commands to avoid hijacking. To fix a violation of this rule, update the call to use SafeCommands-variant, ex. `& $SafeCommands['CommandName'] -Param1 Value1`.
.EXAMPLE
Measure-SafeCommands -CommandAst $CommandAst
.INPUTS
Expand Down Expand Up @@ -83,7 +83,7 @@ Function Measure-ObjectCmdlets {
.SYNOPSIS
Should avoid usage of New/Where/Foreach/Select-Object.
.DESCRIPTION
The built-in *-Object-cmdlets are slow compared to alternatives in .NET. To fix a violation of this rule, consider using an alterantive like `foreach`-keyword etc.`.
The built-in *-Object-cmdlets are slow compared to alternatives in .NET. To fix a violation of this rule, consider using an alternative like `foreach/for`-keyword etc.`.
.EXAMPLE
Measure-ObjectCmdlets -CommandAst $CommandAst
.INPUTS
Expand Down

0 comments on commit 14ddff4

Please sign in to comment.