• 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 chore/lint-fixes
branch: chore/lint-fixes
CHANGE BRANCH
x
Reset
Sync Branches
  • chore/lint-fixes
  • chore/bump-deps
  • 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
  • spec/conformance
  • test/benchmarks

20 Apr 2026 04:41PM UTC coverage: 91.878% (+0.01%) from 91.865%
24678693572

Pull #11

github

dunglas
chore: address remaining golangci-lint findings and enforce them

Expand the enabled linter set in .golangci.yml (err113, goconst,
gocritic, intrange, modernize, perfsprint, thelper, unconvert, unparam,
wastedassign, whitespace) and address every new finding:

- wastedassign: collapse ExecInit's 8 dead var = "" initializations and
  one in parser.go where regexpValue was assigned and immediately
  reassigned.
- gocritic (assignOp / ifElseChain / typeSwitchVar): use x += y, rewrite
  if-else chains to switch, switch on typed values.
- intrange: for range b.N in benchmarks, for i := range len(portValue)
  in the port prefix check; keep escape.go as-is (i needed after loop)
  with a //nolint rationale.
- modernize: replace interface{} with any in tests, use slices.Contains.
- perfsprint: fmt.Sprintf("%d", i) -> strconv.Itoa(i) in test names.
- unconvert: drop redundant int() around p.componentStart.
- unparam: consumeRequiredToken no longer returns its *token since
  every caller discarded it.
- whitespace: trim a stray trailing newline in buildExpected and a
  leading one in newExpectedResult.
- err113: hoist "invalid hostname" to errInvalidHostname at package
  level, add two test-only sentinels for the WPT harness.
- goconst: extract "pattern"/"url" into initTypePattern / initTypeURL.
- thelper: t.Helper() in the three WPT test helpers.
- Drop the dead commented //p.result.Hash/Search lines in the
  constructor parser and refactor the surrounding if/else into a switch.

All 365 WPT cases + the regression tests still pass; golangci-lint
reports 0 issues with the widened configuration.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request #11: refactor!: rename error vars to ErrFoo and expand lint enforcement

64 of 71 new or added lines in 6 files covered. (90.14%)

1482 of 1613 relevant lines covered (91.88%)

1131.99 hits per line

Relevant lines Covered
Build:
Build:
1613 RELEVANT LINES 1482 COVERED LINES
1131.99 HITS PER LINE
Source Files on chore/lint-fixes
  • 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
24678693572 chore/lint-fixes chore: address remaining golangci-lint findings and enforce them Expand the enabled linter set in .golangci.yml (err113, goconst, gocritic, intrange, modernize, perfsprint, thelper, unconvert, unparam, wastedassign, whitespace) and address every ... Pull #11 20 Apr 2026 04:43PM UTC dunglas github
91.88
24678639834 chore/lint-fixes chore: address remaining golangci-lint findings and enforce them Expand the enabled linter set in .golangci.yml (err113, goconst, gocritic, intrange, modernize, perfsprint, thelper, unconvert, unparam, wastedassign, whitespace) and address every ... push 20 Apr 2026 04:42PM UTC dunglas github
91.88
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