From 06efd426d823e96daf2589dd24cf1da7546fc88a Mon Sep 17 00:00:00 2001 From: MischaPanch Date: Sat, 23 Aug 2025 16:46:57 +0200 Subject: [PATCH] Extended memory for adding language support --- .../memories/adding_new_language_support_guide.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.serena/memories/adding_new_language_support_guide.md b/.serena/memories/adding_new_language_support_guide.md index 2918701e..21980531 100644 --- a/.serena/memories/adding_new_language_support_guide.md +++ b/.serena/memories/adding_new_language_support_guide.md @@ -186,9 +186,22 @@ class Program { ## Step 4: Test Suite +Testing the language server implementation is of crucial importance, and the tests will +form the main part of the review process. Make sure that the tests are up to the standard +of Serena to make the review go smoother. + +General rules for tests: + +1. Tests for symbols and references should always check that the expected symbol names and references were actually found. + Just testing that a list came back or that the result is not None is insufficient. +2. Tests should never be skipped, the only exception is skipping based on some package being available or on an unsupported OS. +3. Tests should run in CI, check if there is a suitable GitHub action for installing the dependencies. + ### 4.1 Basic Tests -Create `test/solidlsp/new_language/test_new_language_basic.py`. You should at least test: +Create `test/solidlsp/new_language/test_new_language_basic.py`. +Have a look at the structure of existing tests, for example, in `test/solidlsp/php/test_php_basic.py` +You should at least test: 1. Finding symbols 2. Finding within-file references