Skip to content

Commit 4343b59

Browse files
gkorlandCopilot
andcommitted
fix(analyzers): add import stub methods to JavaScript and Kotlin analyzers
Adds stub add_file_imports() and resolve_import() implementations to JavaScriptAnalyzer and KotlinAnalyzer to satisfy the abstract interface added in the import tracking feature. Without these stubs, the analyzers cannot be instantiated, breaking the seed_test_data step in CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ad639f9 commit 4343b59

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

api/analyzers/javascript/analyzer.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,14 @@ def resolve_method(self, files: dict[Path, File], lsp: SyncLanguageServer, file_
158158
res.append(file.entities[method_dec])
159159
return res
160160

161+
def add_file_imports(self, file: File) -> None:
162+
"""JavaScript import tracking not yet implemented."""
163+
pass
164+
165+
def resolve_import(self, files: dict[Path, File], lsp: SyncLanguageServer, file_path: Path, path: Path, import_node: Node) -> list[Entity]:
166+
"""JavaScript import resolution not yet implemented."""
167+
return []
168+
161169
def resolve_symbol(self, files: dict[Path, File], lsp: SyncLanguageServer, file_path: Path, path: Path, key: str, symbol: Node) -> list[Entity]:
162170
"""Dispatch symbol resolution based on the symbol category.
163171

api/analyzers/kotlin/analyzer.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,14 @@ def resolve_method(self, files: dict[Path, File], lsp: SyncLanguageServer, file_
148148
break
149149
return res
150150

151+
def add_file_imports(self, file: File) -> None:
152+
"""Kotlin import tracking not yet implemented."""
153+
pass
154+
155+
def resolve_import(self, files: dict[Path, File], lsp: SyncLanguageServer, file_path: Path, path: Path, import_node: Node) -> list[Entity]:
156+
"""Kotlin import resolution not yet implemented."""
157+
return []
158+
151159
def resolve_symbol(self, files: dict[Path, File], lsp: SyncLanguageServer, file_path: Path, path: Path, key: str, symbol: Node) -> list[Entity]:
152160
if key in ["implement_interface", "base_class", "parameters", "return_type"]:
153161
return self.resolve_type(files, lsp, file_path, path, symbol)

0 commit comments

Comments
 (0)