Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
test
  • Loading branch information
MariusStorhaug committed Mar 28, 2024
commit fc8c291d4ddc7aa540052d80f744f08d5f562e81
7 changes: 5 additions & 2 deletions scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ Describe "PSScriptAnalyzer tests using settings file [$relativeSettingsFilePath]
$issues = [Collections.Generic.List[string]]::new()
$testResults | Where-Object -Property RuleName -EQ $RuleName | ForEach-Object {
$relativePath = $_.ScriptPath.Replace($Path, '').Trim('\').Trim('/')
$issues.Add(([Environment]::NewLine + " - $relativePath`:L$($_.Line):C$($_.Column) - $($_.SuggestedCorrections.Description)"))
$issues.Add(([Environment]::NewLine + " - $relativePath`:L$($_.Line):C$($_.Column)"))
}

$issues -join '' | Should -BeNullOrEmpty -Because $Description
}
}
}

AfterAll {
$issues
}