• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dunglas / go-urlpattern / 24663455582
92%

Build:
DEFAULT BRANCH: main
Ran 20 Apr 2026 11:15AM UTC
Jobs 1
Files 6
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Apr 2026 11:14AM UTC coverage: 91.82% (+0.2%) from 91.62%
24663455582

push

github

dunglas
spec: conform to latest WHATWG URL Pattern WPT test data

Refresh testdata/urlpatterntestdata.json from the current WPT snapshot
(365 cases, up from 313) and align the implementation with the new
expectations:

- createComponentMatchResult now bounds iteration by the group name
  list length so user-provided regex groups (e.g. :foo((?<x>a))) no
  longer index past the name list and panic. Groups without a name
  are simply not exposed on result.Groups, matching WPT test 364.
- canonicalizeHostname: drop the broad reject-on-'/ ? # \\' guard.
  The URL parser now canonicalizes those boundary chars correctly;
  keep only the ':' check since without it "bad:hostname" would be
  silently split into host + port.
- hostnameParser: drop WithFailOnValidationError so tab/LF/CR in a
  hostname are stripped per the WHATWG URL spec instead of errored.
- canonicalizePort: rewritten to
    1. skip leading ASCII tab / LF / CR and require the first
       significant byte to be a digit (to reject "invalid80"),
    2. always parse against a non-special scheme when no protocol
       is supplied so the library doesn't collapse default ports
       like 80/443 to empty,
    3. remove the former "portValue != canonicalized" rejection
       which also rejected valid canonicalizations like "8\t0" -> "80"
       and "80x" -> "80" (state-override truncation).

All 365 WPT cases pass (2 skipped for advanced unicode features Go's
regexp engine does not support).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

28 of 29 new or added lines in 2 files covered. (96.55%)

1493 of 1626 relevant lines covered (91.82%)

1130.31 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
85.82
0.22% parser.go
Jobs
ID Job ID Ran Files Coverage
1 24663455582.1 20 Apr 2026 11:15AM UTC 6
91.82
GitHub Action Run
Source Files on build 24663455582
  • Tree
  • List 6
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • fc2a9602 on github
  • Prev Build on main (#24663373409)
  • Next Build on main (#24663752132)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc