Repository navigation
fix(tree-sitter-audit): add dart's 3 constructor node types to ground truth - #1478
Merged
Merged
Conversation
… truth dart's constructor_signature/constant_constructor_signature/factory_constructor_signature node types were entirely missing from func_node_types and _get_node_name, so every real dart constructor (unnamed, named, const, factory) scored as a false extra_functions hit. found_functions 677->705, extra_functions 309->281, real_functions 722->884. Fixes #1477. Co-authored-by: Claude Sonnet 5 <[email protected]>
Contributor
7 tasks done
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.
Summary
constructor_signature/constant_constructor_signature/factory_constructor_signatureto dart'sNODE_MAPS["dart"]["func_node_types"], plus a_get_node_namebranch that composes the dottedClassName.constructorNamestring (or bareClassNamefor the unnamed constructor) from their plainly-typedidentifierchildren.gitgalaxy/) change -- same shape as objective-c func_start (4.4% precision) and csharp func_start (58.2% precision) have large, confirmed-real false-positive rates #1314's csharpconstructor_declarationfix.Measured:
found_functions677->705,extra_functions309->281,real_functions722->884 (class_precision unaffected,extra_classesstayed 0).Fixes #1477.
Test plan
tree_sitter_accuracy_audit.py --lang dartshows the numbers above,--regenerateblessed--summary-tableregenerated--all --ciclean across all 31 languages (no shared-helper ripple -- this only touches the dart-specific NODE_MAPS entry and a dart-gated_get_node_namebranch)