Fix symbol name resolution in selected LS (#1247)

Adds tests for name resolution for each language and fixes the name resolution where tests have failed.

Also:

Extends python tests to cover ty
Extends skipping conditions for several LS (but only when not in CI)
Better test output in CI
Removed a wrong python test (started failing for ty and should have failed for pyright too)
This commit is contained in:
Michael Panchenko authored and GitHub committed 2026-04-01 16:29:00 +02:00
1 parent 7377a84337
commit d30cdf8474
59 files changed
+1015 -97

No files matched your search

+15
View File
@@ -15,8 +15,10 @@ from solidlsp.language_servers.csharp_language_server import (
find_solution_or_project_file,
)
from solidlsp.ls_config import Language, LanguageServerConfig
from solidlsp.ls_types import SymbolKind
from solidlsp.ls_utils import SymbolUtils
from solidlsp.settings import SolidLSPSettings
from test.solidlsp.conftest import format_symbol_for_assert, has_malformed_name, request_all_symbols
@pytest.mark.csharp
@@ -359,3 +361,16 @@ class TestCSharpSolutionProjectOpening:
# Verify the file actually exists
assert os.path.exists(result)
@pytest.mark.parametrize("language_server", [Language.CSHARP], indirect=True)
def test_bare_symbol_names(self, language_server) -> None:
all_symbols = request_all_symbols(language_server)
malformed_symbols = []
for s in all_symbols:
if has_malformed_name(s, period_allowed=s["kind"] == SymbolKind.Namespace):
malformed_symbols.append(s)
if malformed_symbols:
pytest.fail(
f"Found malformed symbols: {[format_symbol_for_assert(sym) for sym in malformed_symbols]}",
pytrace=False,
)