From b41b1b4e5323d102d5895924d2a1e459ddefe179 Mon Sep 17 00:00:00 2001 From: fukusuket <41001169+fukusuket@users.noreply.github.com> Date: Fri, 21 Mar 2025 00:41:55 +0900 Subject: [PATCH] chg: Output horizontally --- WELA.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/WELA.ps1 b/WELA.ps1 index 4ca020c3..1d0044f7 100644 --- a/WELA.ps1 +++ b/WELA.ps1 @@ -95,10 +95,15 @@ function ShowRulesCountsByLevel { "low" = "Green" "informational" = "White" # Assuming a default color for informational } - + $i = 0 $usableRate | Sort-Object { $levelColorMap.Keys.IndexOf($_.Level) } | ForEach-Object { $color = $levelColorMap[$_.Level] - Write-Host "$($_.Level) rules: $($_.UsableCount) / $($_.TotalCount) ($($_.Percentage)%)" -ForegroundColor $color + Write-Host -NoNewline "$($_.Level) rules: $($_.UsableCount) / $($_.TotalCount) ($($_.Percentage)%)" -ForegroundColor $color + if ($i -lt $levelColorMap.Count - 1) + { + Write-Host -NoNewline ", " + } + $i++ } Write-Output "" Write-Output ""