Repository navigation
Drop two wrapped-function matchers that no pinned grammar can produce - #17
Merged
Merged
Conversation
field_definition with name_field "name" and property_definition with
name_field "name" are both unreachable. tree-sitter-javascript 0.23.1
declares field_definition with fields decorator, property and value, so
child_by_field_name("name") returns None and collect continues at
src/engine/mod.rs:944. property_definition is absent from
tree-sitter-javascript 0.23.1, tree-sitter-typescript 0.23.2 and its tsx
grammar, so node.kind() never matches. Confirmed against each crate's
node-types.json and parser.c symbol table.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two of the seven entries in
JS_TS_WRAPPED_FUNCTIONScan never match a node in any grammar this repo pins. They are dead configuration that reads as live.field_definitionwithname_field: "name"is unreachable because tree-sitter-javascript 0.23.1 declares that node with fieldsdecorator,propertyandvalueonly.child_by_field_name("name")returnsNone, socollecthits theelse { continue }at src/engine/mod.rs:944 and moves on. The live entry for that grammar is the adjacentfield_definitionwithname_field: "property".property_definitionis unreachable in all three grammars that share this table. It is absent from tree-sitter-javascript 0.23.1, from tree-sitter-typescript 0.23.2, and from its tsx grammar, sonode.kind()never compares equal. Live coverage comes frompublic_field_definitionwithname_field: "name".Verified against each vendored crate rather than from memory. Both node-types.json files and both parser.c symbol tables were read directly.
No behavior change. Removing an entry that never matched leaves the matched set identical, so the live wrapped-function coverage is untouched. The existing test at tests/engine_test.rs:864 asserts both
calculateScore(variable_declarator) andhandle(public_field_definition) are still extracted, so CI proves the survivors still fire.This table is deliberately uniform and the two survivors look interchangeable with the deleted pair, so the next person adding a TypeScript class-field matcher had no way to tell which entries were live.
Not shipped
Noted while reading, no code changed. Each needs a decision that is not a dead-code deletion.
capture_tag_metapanics on a crafted tag.openandclosecome from two independentfindcalls with noopen < closecheck, so a tagger line whose name contains>slices out of order. Reproduced standalone with the exact expressions:byte range starts at 7 but ends at 5, exit 101. Reaching it needs a source repo carrying a loose annotated-tag object, which is a real guard question rather than a cleanup.assemble_treejoins mktree rows with\nand no-z, so a filename containing a newline injects extra tree rows. Confirmed against git: one row forx\n100644 blob <sha>\typroduced a two-entry tree. The sibling writerstrip_treeat src/store.rs:1870 already uses-z. Fixing this one is a behavior change to a write path.0and discardold_def.row, which is in scope. Every removal reportssrc/lib.rs:0.adjudicatewithout--visibilityusesVisibilityPolicy::default()instead of the./visibility.tomldiscovery every other entry point uses, so anembargo_untilin the project file is ignored and the verdict comes back Adjudicated.Verification here is the grammar tables quoted above plus
cargo fmt --all -- --check. The full gate is CI's to run.