Skip to content

Commit 134c719

Browse files
Refactor file path normalization logic and simplify output formatting in main.ps1
1 parent 6908310 commit 134c719

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

scripts/main.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ foreach ($file in $files) {
5353
# 3. Normalize the file paths in FilesAnalyzed
5454
$normalizedFiles = @()
5555
foreach ($fa in $jsonContent.FilesAnalyzed) {
56-
$normalizedFiles += ($fa.File -Split '999.0.0')[-1].Replace('\', '/').TrimStart('/').TrimEnd('/')
56+
$normalizedFiles += ($fa -Split '999.0.0')[-1].Replace('\', '/').TrimStart('/').TrimEnd('/')
5757
}
5858
$jsonContent.FilesAnalyzed = $normalizedFiles
5959

@@ -236,8 +236,7 @@ LogGroup 'Set step summary' {
236236
Details "Files analyzed [$($codeCoverage.FilesAnalyzedCount)]" {
237237
Paragraph {
238238
$codeCoverage.FilesAnalyzed | ForEach-Object {
239-
$file = ConvertTo-RelativePath $_
240-
Write-Output "- $file"
239+
Write-Output "- $_"
241240
}
242241
}
243242
}

0 commit comments

Comments
 (0)