refactor: address code review feedback on heritage extractor

- Simplify makeNode test helper parameter type
- Use !== null check in parse worker for extractFromCall result

Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/b55df80d-758a-48cd-96de-a7657bdc2acb

Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-04-16 19:07:13 +00:00 • committed by GitHub
parent 9530655650
commit ad9f8386f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -1706,7 +1706,7 @@ const processFileGroup = (
captureMap['call']!,
{ filePath: file.path, language },
);
if (heritageItems && heritageItems.length > 0) {
if (heritageItems !== null) {
for (const item of heritageItems) {
result.heritage.push({
filePath: file.path,

View file

@ -40,7 +40,7 @@ interface MockNode {
}
/** Create a minimal mock SyntaxNode for capture map entries. */
function makeNode(text: string, type = 'identifier', parent?: MockNode | null): MockNode {
function makeNode(text: string, type = 'identifier', parent?: MockNode): MockNode {
return { type, text, parent: parent ?? null };
}