Name resource_api title pattern groups as Regexp#names does #20

Merged
benvin merged 2 commits from benvin/gentypes-guard-titlepatterns into main 2026-11-14 18:10:52 +11:00
Member

resource_api names title-pattern captures with Regexp.new(pattern).names, which counts only real named groups. w10k matched (?<name> anywhere in the source, so an escaped paren, a character class or a comment added names puppet never emits.

  • scan patterns as Onigmo does: escapes, nested character classes, (?#...) and extended-mode comments hold no groups; names stay unique in first-appearance order
  • skip a pattern whose names or back references fall outside what w10k models (Unicode or hyphenated names, \g, forward \k)
  • bump gentypes.Version to 14
resource_api names title-pattern captures with `Regexp.new(pattern).names`, which counts only real named groups. w10k matched `(?<name>` anywhere in the source, so an escaped paren, a character class or a comment added names puppet never emits. - scan patterns as Onigmo does: escapes, nested character classes, `(?#...)` and extended-mode comments hold no groups; names stay unique in first-appearance order - skip a pattern whose names or back references fall outside what w10k models (Unicode or hyphenated names, `\g`, forward `\k`) - bump gentypes.Version to 14
benvin changed target branch from benvin/gentypes-shellvar to main 2026-11-10 21:45:41 +11:00
benvin added 2 commits 2026-11-10 21:45:41 +11:00
Name resource_api title pattern groups as Regexp#names does
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
419e2f88ce
Scan the pattern the way Onigmo does: escapes, character classes, (?#...)
comments and extended-mode comments hold no groups, names are unique in
first-appearance order, and names or references w10k cannot model skip.
Merge remote-tracking branch 'origin/benvin/gentypes-shellvar' into benvin/gentypes-guard-titlepatterns
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
b7d625894f
benvin merged commit 8a8c30878b into main 2026-11-14 18:10:52 +11:00
benvin deleted branch benvin/gentypes-guard-titlepatterns 2026-11-14 18:10:52 +11:00
This repo is archived. You cannot comment on pull requests.