Skip to content

Commit b52ee01

Browse files
committed
Added test cases for JavaSitter for 89% coverage
Signed-off-by: John Rofrano <johnnyroy@johnrofrano.com>
1 parent f69c40d commit b52ee01

2 files changed

Lines changed: 434 additions & 1 deletion

File tree

cldk/analysis/java/treesitter/javasitter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def get_all_imports(self, source_code: str) -> Set[str]:
106106
import_declerations: Captures = self.frame_query_and_capture_output(query="(import_declaration (scoped_identifier) @name)", code_to_process=source_code)
107107
return {capture.node.text.decode() for capture in import_declerations}
108108

109+
# TODO: This typo needs to be fixed (i.e., package not pacakge)
109110
def get_pacakge_name(self, source_code: str) -> str:
110111
"""Get the package name from the source code.
111112
@@ -226,7 +227,7 @@ def safe_ascend(self, node: Node, ascend_count: int) -> Node:
226227
def get_call_targets(self, method_body: str, declared_methods: dict) -> Set[str]:
227228
"""Generate a list of call targets from the method body.
228229
229-
Uses simple name resolution for finding the call targets. Nothing sophiscticed here. Just a simple search
230+
Uses simple name resolution for finding the call targets. Nothing sophisticated here. Just a simple search
230231
over the AST.
231232
232233
Parameters

0 commit comments

Comments
 (0)