Skip to content

Commit 8b9d99d

Browse files
Refactor command output to separate display for executed commands, improving clarity in coverage report
1 parent 1225f8e commit 8b9d99d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/main.ps1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,17 +187,18 @@ $command
187187
}
188188

189189
$missedForDisplay += $tablefooter
190+
$missedForDisplay
190191
}
191192

192193
LogGroup 'Set table for executed commands' {
193-
$missedForDisplay = $tableheader
194+
$executedForDisplay = $tableheader
194195

195196
foreach ($item in $codeCoverage.CommandsExecuted | Sort-Object -Property File, Line) {
196197
$command = $item.Command
197198
# $command = [System.Web.HttpUtility]::HtmlEncode($item.Command)
198199
$command = Normalize-IndentationExceptFirst -Code $command
199200
# $command = $command.Replace([Environment]::NewLine, '<br>').Replace(' ', '&nbsp;').Replace('{', '\{').Replace('}', '\}')
200-
$missedForDisplay += @"
201+
$executedForDisplay += @"
201202
<tr>
202203
<td>$($item.File)</td>
203204
<td>$($item.Line)</td>
@@ -217,7 +218,8 @@ $command
217218
"@
218219
}
219220

220-
$missedForDisplay += $tablefooter
221+
$executedForDisplay += $tablefooter
222+
$executedForDisplay
221223
}
222224

223225
LogGroup 'Set step summary' {
@@ -246,6 +248,7 @@ LogGroup 'Set step summary' {
246248
}
247249

248250
Set-GitHubStepSummary -Summary $markdown
251+
$markdown
249252
}
250253

251254

0 commit comments

Comments
 (0)