GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — BoldForDelphi/UnitTest/parse_coverage.ps1 at develop · bero/BoldForDelphi

Expand file tree

/

parse_coverage.ps1

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
15 lines (15 loc) · 718 Bytes
/

parse_coverage.ps1

Copy path

File metadata and controls

15 lines (15 loc) · 718 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$lines = Get-Content 'coverage_report\CodeCoverage_summary.html'
$joined = $lines -join ''
$rows = [regex]::Matches($joined, '>([A-Za-z_]+)</a><td>(\d+)<td>(\d+)<td>(\d+)<td[^>]*>(\d+)')
$results = @()
foreach ($r in $rows) {
$name = $r.Groups[1].Value
$covered = [int]$r.Groups[2].Value
$uncov = [int]$r.Groups[3].Value
$total = [int]$r.Groups[4].Value
$pct = [int]$r.Groups[5].Value
if ($uncov -gt 15 -and $pct -lt 70 -and $total -lt 500 -and $total -gt 30) {
$results += [PSCustomObject]@{Unit=$name; Covered=$covered; Uncovered=$uncov; Total=$total; Coverage="$pct%"}
}
}
$results | Sort-Object -Property Uncovered -Descending | Select-Object -First 25 | Format-Table -AutoSize
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.