Skip to content

Commit 782ade6

Browse files
Refactor command handling to streamline normalization of missed and executed commands in coverage report
1 parent 8b9d99d commit 782ade6

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

scripts/main.ps1

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,7 @@ LogGroup 'Set table for missed commands' {
162162
$missedForDisplay = $tableheader
163163

164164
foreach ($item in $codeCoverage.CommandsMissed | Sort-Object -Property File, Line) {
165-
$command = $item.Command
166-
# $command = [System.Web.HttpUtility]::HtmlEncode($item.Command)
167-
$command = Normalize-IndentationExceptFirst -Code $command
168-
# $command = $command.Replace([Environment]::NewLine, '<br>').Replace(' ', '&nbsp;').Replace('{', '\{').Replace('}', '\}')
165+
$command = Normalize-IndentationExceptFirst -Code $item.Command
169166
$missedForDisplay += @"
170167
<tr>
171168
<td>$($item.File)</td>
@@ -194,10 +191,7 @@ LogGroup 'Set table for executed commands' {
194191
$executedForDisplay = $tableheader
195192

196193
foreach ($item in $codeCoverage.CommandsExecuted | Sort-Object -Property File, Line) {
197-
$command = $item.Command
198-
# $command = [System.Web.HttpUtility]::HtmlEncode($item.Command)
199-
$command = Normalize-IndentationExceptFirst -Code $command
200-
# $command = $command.Replace([Environment]::NewLine, '<br>').Replace(' ', '&nbsp;').Replace('{', '\{').Replace('}', '\}')
194+
$command = Normalize-IndentationExceptFirst -Code $item.Command
201195
$executedForDisplay += @"
202196
<tr>
203197
<td>$($item.File)</td>

0 commit comments

Comments
 (0)