Repository navigation
feat: add Elixir, F# and ObjC to health complexity maps - #2152
Conversation
|
Thanks @krishna231122-del, and the instinct is right: these three shipped as parsed languages on 5 September and got no complexity signal at all, so the gap is real and this is the file that closes it. I test-merged this onto current main and ran the real walker against small samples of each language, because a node map is one of the few things where reading it cannot tell you whether it is right. Two of the three need another pass, and the third is close. Elixir does not work, and I do not think it can with this shape. In tree-sitter-elixir there is no Both real functions are invisible, the name in the report is a keyword, and with Objective-C is nearly there, two fixes. static int gCounter = 0;
static NSString *gName = nil;
int helper(int x);
@implementation Ledger
- (int)post:(int)amount { if (amount > 0) { return 1; } return 0; }
@endTwo globals counted as functions of complexity 1 each, which drags the file's average complexity down toward 1 on exactly the headers-and-globals files where it matters. Your own C map from #2113 already gets this right: Second, F# counts functions correctly but cannot name them. Both functions in a two-function module come back as The The general point, which is why I am not merging on green: CI passing tells you the maps import, not that they are right. A handful of table-driven cases per language, source in and expected ccn out, would have caught all three of these and would make the next language cheap. Happy to look again as soon as it is pushed. |
|
Correcting my comment above, which I wrote without reading the review before it. That review stands, and this should not have gone in in this state. The claim I made about it being safe because 0.50.0 re-scores anyway is backwards: the re-score is what makes it worse, not better. To be concrete about what is now on
This matters more than usual this week. 0.50.0 moves A follow-up will drop @krishna231122-del to be clear, this is on me and not on you: the review above was the right call and I talked past it. The Objective-C and F# work is close, and that review lists exactly what each one needs. If you would like to take the follow-up yourself, say the word and it is yours. |
Summary
LanguageNodeMapdefinitions inlanguages.pyfor the new parser capabilities.Related Issues
Test Plan
pytest)ruff check .)npm run build) (if frontend changes)Checklist