Skip to content

Commit

Permalink
Sort files in Coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
fflaten committed Aug 4, 2024
1 parent 6560623 commit 2b690c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/functions/Coverage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ function Get-CoverageBreakpoints {
[ScriptBlock]$Logger
)

$fileGroups = @($CoverageInfo | & $SafeCommands['Group-Object'] -Property Path)
# PowerShell 6.1+ sorts during Group-Object. Sorting to get equal report order for Windows PowerShell and PowerShell
$fileGroups = @($CoverageInfo | & $SafeCommands['Group-Object'] -Property Path | & $SafeCommands['Sort-Object'] -Property Name)
foreach ($fileGroup in $fileGroups) {
if ($null -ne $Logger) {
$sw = [System.Diagnostics.Stopwatch]::StartNew()
Expand Down

0 comments on commit 2b690c0

Please sign in to comment.