mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 02:16:21 +00:00
Fixes in various LS and in tests to accommodate diagnostics edge behavior
Also minor fix in go test expectations of symbol name
This commit is contained in:
1 parent
bd7e64e85a
commit
da59a19c50
14 files changed
+560
-56
No files matched your search
@@ -8,11 +8,12 @@ from pathlib import Path
|
||||
from pprint import pprint
|
||||
|
||||
from serena.agent import SerenaAgent
|
||||
from serena.config.serena_config import SerenaConfig
|
||||
from serena.config.serena_config import LanguageBackend, SerenaConfig
|
||||
from serena.constants import REPO_ROOT
|
||||
from serena.tools import (
|
||||
FindFileTool,
|
||||
FindReferencingSymbolsTool,
|
||||
GetDiagnosticsForFileTool,
|
||||
JetBrainsFindSymbolTool,
|
||||
JetBrainsGetSymbolsOverviewTool,
|
||||
JetBrainsInlineSymbol,
|
||||
@@ -24,6 +25,7 @@ from serena.tools import (
|
||||
if __name__ == "__main__":
|
||||
serena_config = SerenaConfig.from_config_file()
|
||||
serena_config.web_dashboard = False
|
||||
serena_config.language_backend = LanguageBackend.LSP
|
||||
# project = Path(REPO_ROOT).parent / "serena-jetbrains-plugin-copy"
|
||||
project = Path(REPO_ROOT)
|
||||
agent = SerenaAgent(project=str(project), serena_config=serena_config)
|
||||
@@ -40,7 +42,7 @@ if __name__ == "__main__":
|
||||
jb_inspections_tool = agent.get_tool(JetBrainsRunInspectionsTool)
|
||||
|
||||
result = agent.execute_task(
|
||||
lambda: overview_tool.apply(
|
||||
lambda: diagnostics_in_file_tool.apply(
|
||||
# name_path_pattern="SerenaAgent",
|
||||
relative_path="test/resources/repos/clojure/test_repo/src/test_app/diagnostics_sample.clj",
|
||||
# keep_definition=True,
|
||||
|
||||
Reference in new issue
Block a user