mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-09 03:17:54 +00:00
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:
parent
9530655650
commit
ad9f8386f5
2 changed files with 2 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue