test: add golden coverage for extension parsers#323
Conversation
Benchmark Regression ReportThreshold: 10.00%
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ca698bebb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| fn extractObjCMethodName(line: []const u8) ?[]const u8 { | ||
| if (!startsWith(line, "- (") and !startsWith(line, "+ (")) return null; |
There was a problem hiding this comment.
Parse ObjC methods without fixed "- (" spacing
Objective-C allows optional whitespace between the -/+ token and the return-type parentheses, but this check only accepts the exact - ( or + ( prefix. Files that use valid forms like -(void)loadPage (or multiple spaces) will now miss method symbols entirely, which undercuts the new .mm outline coverage introduced here. Parse the leading -/+ first, then trim whitespace before checking for ( so all valid declarations are handled.
Useful? React with 👍 / 👎.
Benchmark Regression ReportThreshold: 10.00%
|
Summary
Tightens the parser assurance from #322.
This adds per-extension golden outline assertions so the newly covered extensions are validated by their own parsed outline, not only by global
findAllSymbolssmoke checks.Coverage added
.cc: C++ include, class, member-like function, free function.mm:#import, Objective-C@interface/@implementation, Objective-C method name, C++ class, C-style function.java,.kt.svelte,.vue,.astro.sh.css,.scss.sql,.proto.f90.ll,.mlir,.tdParser fixes included
classdeclarations.#importin addition to#include..mmpath now extracts basic Objective-C++ outline symbols:@interface,@implementation,@protocol, and-/+method names.Validation
zig build testzig buildbench-regression / benchpassedBenchmark notes
The benchmark check passed, but the generated comment is noisy:
codedb_edit+13.27% flagged; all other tools were within threshold, includingcodedb_symbol-9.05%.codedb_edit+13.38% andcodedb_symbol+14.24% flagged.This patch does not touch edit code. The symbol-path change is plausibly due to parser code/test growth increasing the indexed corpus and benchmark variance. Parser-adjacent correctness is covered by the new golden outline tests plus
zig build test.