Skip to content

Commit

Permalink
Update Pester.BuildAnalyzerRules
Browse files Browse the repository at this point in the history
  • Loading branch information
fflaten committed May 18, 2024
1 parent 0dd1602 commit 78e40a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Pester.BuildAnalyzerRules/Pester.BuildAnalyzerRules.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ function Measure-SafeCommands {
[string]$correction = "& `$SafeCommands['$commandName']"
[string]$file = $MyInvocation.MyCommand.Definition
[string]$description = 'Replacing with SafeCommands-type'
$correctionExtent = New-Object 'Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.CorrectionExtent' $startLineNumber, $endLineNumber, $startColumnNumber, $endColumnNumber, $correction, $file, $description
$suggestedCorrections = New-Object System.Collections.ObjectModel.Collection['Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.CorrectionExtent']
$correctionExtent = [Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.CorrectionExtent]::new($startLineNumber, $endLineNumber, $startColumnNumber, $endColumnNumber, $correction, $file, $description)
$suggestedCorrections = [System.Collections.ObjectModel.Collection[Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.CorrectionExtent]]::new()
$suggestedCorrections.add($correctionExtent) > $null

# Output error
Expand Down

0 comments on commit 78e40a5

Please sign in to comment.