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

dunglas / go-urlpattern
92%
main: 92%

Build:
Build:
LAST BUILD BRANCH: chore/lint-fixes
DEFAULT BRANCH: main
Repo Added 15 Sep 2024 08:23PM UTC
Token yGjZrxkSLEYRXjo0G6xsg1Sx0WLJ4o8bQ regen
Build 48 Last
Files 6
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

LAST BUILD ON BRANCH spec/conformance
branch: spec/conformance
CHANGE BRANCH
x
Reset
Sync Branches
  • spec/conformance
  • chore/bump-deps
  • chore/lint-fixes
  • chore/upstream-whatwg-url
  • fix/canonicalize-hash-error
  • fix/process-hash-strip-prefix
  • fix/string-delimiters
  • fix/tokenizer-error-swallow
  • main
  • perf/duplicate-name-map
  • perf/scheme-lookups
  • test/benchmarks

20 Apr 2026 09:21AM UTC coverage: 91.641% (+0.2%) from 91.441%
24663216038

Pull #9

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>
Pull Request #9: spec: conform to latest WHATWG URL Pattern WPT test data

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

1491 of 1627 relevant lines covered (91.64%)

1124.09 hits per line

Relevant lines Covered
Build:
Build:
1627 RELEVANT LINES 1491 COVERED LINES
1124.09 HITS PER LINE
Source Files on spec/conformance
  • Tree
  • List 6
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
24663216038 spec/conformance 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 bou... Pull #9 20 Apr 2026 11:09AM UTC dunglas github
91.64
24663147413 spec/conformance 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 bou... push 20 Apr 2026 11:07AM UTC dunglas github
91.64
See All Builds (42)

Badge your Repo: go-urlpattern

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

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

Refresh
  • Settings
  • Repo on GitHub
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