Skip to content

Add a check for superfluous capture groups - #55

Merged
thatch merged 1 commit into
thatch:masterfrom
jvoisin:superfluous_capture
Jul 31, 2026
Merged

Add a check for superfluous capture groups#55
thatch merged 1 commit into
thatch:masterfrom
jvoisin:superfluous_capture

Conversation

@jvoisin

@jvoisin jvoisin commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

thatch added a commit that referenced this pull request Jul 31, 2026
Renumber check_single_char_alternation from 129 to 131; it collided
with the checks added by #55 and #56 (both already 129/130), since
all three PRs were written independently against the same base.
thatch added a commit that referenced this pull request Jul 31, 2026
Renumber check_quantified_lookaround from 129 to 132; it collided
with checks added by #55/#56/#57 (129/130/131), since all were
written independently against the same base.
thatch added a commit that referenced this pull request Jul 31, 2026
Renumber check_redundant_noncapturing_group from 129 to 133; it
collided with checks added by #55-#58 (129-132), since all were
written independently against the same base.

Also fix test_run_all_checkers_no_errors: it used (?:x) as a
baseline 'no errors expected' pattern, but that group is now
correctly flagged as redundant by the new check. Switched to a
plain 'x' with no group to keep the test's intent.
thatch added a commit that referenced this pull request Jul 31, 2026
This is the second time independent PRs collided on the same message
id (126 across #52/#53/#54, now 129 across #55-#59). Statically walk
each check_/bygroups_check_/groups_check_ function's source for its
'num' assignment and assert none repeat, so a future collision fails
CI instead of silently shipping ambiguous warning codes.
@thatch
thatch merged commit 303035f into thatch:master Jul 31, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants