Skip to content

Hover/signature/автокомплит: «?» у необязательных параметров и список содержимого структур#3985

Merged
nixel2007 merged 4 commits into
developfrom
feature/hover-optional-params-and-structure-render
Jun 1, 2026
Merged

Hover/signature/автокомплит: «?» у необязательных параметров и список содержимого структур#3985
nixel2007 merged 4 commits into
developfrom
feature/hover-optional-params-and-structure-render

Conversation

@nixel2007

@nixel2007 nixel2007 commented Jun 1, 2026

Copy link
Copy Markdown
Member

Что сделано

Три связанных улучшения отображения параметров и структур в hover, signature help и автокомплите.

1. Необязательные параметры помечаются «?»

Знак приклеивается к типу (Имя: Тип?), а при отсутствии типа — к имени (Имя?), перед значением по умолчанию:

  • Имя: Тип?, Имя: Тип? = -10, Имя?, Имя? = Ложь

Затронуты SignatureHelpProvider, PlatformMemberHoverBuilder, ConstructorHoverBuilder, DescriptionFormatter (исходные методы) и CompletionProvider.formatSignature (где ранее использовались квадратные скобки [Имя]).

2. Содержимое структур/соответствий — маркдаун-списком

Вместо однострочного Структура { Ключ: Тип }:

Тип: Структура

* **Имя**: `Строка`
* **Возраст**: `Число`
* **Контакты**: `Структура`
  * **Email**: `Строка`

Работает для Структура, ФиксированнаяСтруктура, Соответствие, ФиксированноеСоответствие и строки ТаблицаЗначений (колонки под Тип: ТаблицаЗначений из СтрокаТаблицыЗначений). Вложенные структуры и колонки получают отступ, объединения типов — `A` | `B`.

3. Описания ключей из doc-комментария параметра

Для параметра-структуры с задокументированными ключами к каждому ключу добавляется описание:

Тип: Структура

* **Адрес**: `Строка` — адрес сервера.
* **Порт**: `Число` — номер порта.

Источник — ParameterDescription.types().fields() охватывающего метода. Ключи, описанные в doc, но не выведенные инференсером, тоже отображаются. Заодно у «открытых» объектов с собственными полями из заголовка убран шумный элемент-итератор из КлючИЗначение.

Тесты

Добавлены/обновлены тесты в SignatureHelpProviderTest, CompletionProviderTest, PlatformMemberHoverBuilderTest, ConstructorHoverBuilderTest, MethodSymbolMarkupContentBuilderTest, VariableSymbolMarkupContentBuilderTest и новый VariableSymbolStructureRenderTest (детерминированный рендер всех пяти типов). Прогон по hover.*, провайдерам signature/completion/hover и types.* зелёный.

🤖 Generated with Claude Code

nixel2007 and others added 3 commits June 1, 2026 11:23
…мплите

Необязательные параметры теперь рендерятся со знаком «?»: он приклеивается
к типу (Имя: Тип?), а при отсутствии типа — к имени (Имя?). Затрагивает
SignatureHelpProvider, PlatformMemberHoverBuilder, ConstructorHoverBuilder,
DescriptionFormatter (исходные методы) и CompletionProvider.formatSignature
(где ранее использовались квадратные скобки [Имя]).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Содержимое «открытых» объектов (Структура, ФиксированнаяСтруктура,
Соответствие, ФиксированноеСоответствие, строка ТаблицыЗначений) теперь
показывается в hover маркдаун-списком вида

    Тип: Структура

    * **Ключ**: `Тип` | `Тип2`

вместо однострочного инлайна `Структура { Ключ: Тип }`. Вложенные структуры
и колонки строки ТаблицыЗначений рекурсивно получают увеличенный отступ.
Слот под описание ключа зарезервирован форматом (заполняется отдельно).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…over

Для параметра-структуры с задокументированными ключами («Параметры:» с
вложенными «* Ключ - Тип - описание») в hover к каждому ключу добавляется
описание из doc-комментария: «* **Ключ**: `Тип` — описание». Источник —
ParameterDescription.types().fields() охватывающего метода; ключи, описанные
в doc, но не выведенные инференсером, тоже отображаются.

Заодно у «открытых» объектов с собственными полями (Структура/Соответствие)
в заголовке типа убран шумный элемент-итератор «из КлючИЗначение» —
содержимое и так показано списком ключей.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Copilot AI review requested due to automatic review settings June 1, 2026 09:49
@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

PR standardизирует отображение необязательных параметров, заменяя локализованные маркеры на суффикс ? во hover/completion/signature, и добавляет рендеринг полей структур как markdown-bullet-листов с объединением инференса и doc-метаданных.

Changes

Optional Parameter Marking & Structure Field Rendering

Layer / File(s) Summary
Optional parameter marker logic & helper
src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/HoverParameters.java, src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/ConstructorHoverBuilder.java, src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder.java, src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/DescriptionFormatter.java, src/main/java/com/github/_1c_syntax/bsl/languageserver/providers/CompletionProvider.java, src/main/java/com/github/_1c_syntax/bsl/languageserver/providers/SignatureHelpProvider.java
Добавлен пакетный helper HoverParameters.appendNameAndType(...); логика формирования отображения необязательных параметров изменена на суффикс ? и делегирована helper в местах построения hover/подсказок/complete/signature.
Variable structure field rendering
src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/VariableSymbolMarkupContentBuilder.java
getInferredTypes и сопутствующие функции переписаны: типы выводятся как заголовок, а открытые объектные типы рендерятся рекурсивно в Markdown-bullets; добавлены функции для объединения типов полей, обработки doc-метаданных и форматирования inline-типов.
Test updates for optional parameter marking
src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/ConstructorHoverBuilderTest.java, src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/MethodSymbolMarkupContentBuilderTest.java, src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilderTest.java, src/test/java/com/github/_1c_syntax/bsl/languageserver/providers/CompletionProviderTest.java, src/test/java/com/github/_1c_syntax/bsl/languageserver/providers/SignatureHelpProviderTest.java
Тесты обновлены, чтобы проверять отображение ? для необязательных параметров и отсутствие старой скобочной/локализованной нотации.
Test coverage for structure field rendering
src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/VariableSymbolMarkupContentBuilderTest.java, src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/VariableSymbolStructureRenderTest.java
Добавлены и расширены тесты, проверяющие bullet-list рендеринг для Структура, Соответствие, фиксированных вариантов, ТаблицаЗначений, вложенных структур, дедупликации ключей в union-референсах и объединения типов через `

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • 1c-syntax/bsl-language-server#3420: Изменяет ту же логику формирования подписи параметров в getParametersSignatureDescription.
  • 1c-syntax/bsl-language-server#3730: Связанная работа над hover-рендерингом переменных и дополнительными секциями hover-контента.

Poem

🐰 Я кролик, скачу по коду враз,
Заменил скобки старые на ? враз,
Структуры стали списком, как газ,
Поля в буллетах — порядок сейчас,
Хоп — и hover стал чище для нас!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.22% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Заголовок точно описывает основные изменения PR: добавление маркера «?» для необязательных параметров и рендер структур markdown-списком.
Description check ✅ Passed Описание подробно раскрывает все три связанные улучшения с примерами кода и затронутыми компонентами, полностью соответствуя changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/hover-optional-params-and-structure-render

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Этот PR улучшает отображение сигнатур и типов в LSP-фичах (hover, signature help, completion): вводит единый маркер необязательных параметров ? и делает более читабельным вывод содержимого «открытых» объектов (Структура/Соответствие/фиксированные варианты/строка ТаблицыЗначений) в виде markdown-списка, включая описания ключей из doc-комментариев.

Changes:

  • Перевод маркировки необязательных параметров на ? (вместо [...]/optionalParameter) в signature help, hover и completion detail.
  • Рендер содержимого структур/соответствий/строки ТЗ в hover переменных markdown-списком с поддержкой вложенности и union-типов.
  • Подмешивание описаний ключей из doc-комментариев параметров-структур в hover.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/main/java/com/github/_1c_syntax/bsl/languageserver/providers/SignatureHelpProvider.java Добавлена маркировка необязательных параметров ? в label сигнатуры.
src/main/java/com/github/_1c_syntax/bsl/languageserver/providers/CompletionProvider.java В completion detail необязательные параметры теперь помечаются ? вместо квадратных скобок.
src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder.java Убрана текстовая пометка optionalParameter; добавлен ? в markdown-рендер параметров.
src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/ConstructorHoverBuilder.java Аналогично PlatformMemberHoverBuilder: ? для optional и обновлён рендер параметров.
src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/DescriptionFormatter.java В сигнатурах методов optional-параметры помечаются ? перед значением по умолчанию.
src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/VariableSymbolMarkupContentBuilder.java Новый рендер содержимого «открытых» объектов markdown-списком + doc-описания ключей.
src/test/java/com/github/_1c_syntax/bsl/languageserver/providers/SignatureHelpProviderTest.java Обновлены ожидания по ? для optional параметров без типа.
src/test/java/com/github/_1c_syntax/bsl/languageserver/providers/CompletionProviderTest.java Обновлены ожидания: ? вместо [...], проверка отсутствия скобок.
src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilderTest.java Обновлены ожидания markdown-рендера optional параметров с ?.
src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/ConstructorHoverBuilderTest.java Обновлены ожидания markdown-рендера optional параметров с ?.
src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/MethodSymbolMarkupContentBuilderTest.java Обновлены ожидания сигнатур: ? у optional параметров.
src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/VariableSymbolMarkupContentBuilderTest.java Добавлены проверки bullet-list рендера из инференса и doc-описаний ключей.
src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/VariableSymbolStructureRenderTest.java Новый детерминированный тест рендера пяти «открытых» типов через вручную заданный TypeSet.

Comment on lines +283 to +285
var typeLabel = field.types().stream()
.map(td -> "`" + td.name() + "`")
.collect(Collectors.joining(" | "));
Comment on lines +188 to +197
for (var info : doc.values()) {
if (rendered.contains(info.name().toLowerCase(Locale.ROOT))) {
continue;
}
out.add(fieldBullet(pad, info.name(), info.typeLabel(), info.description()));
if (!info.children().isEmpty()) {
var childOut = new ArrayList<String>();
collectDocOnlyBullets(childOut, info.children(), indent + 1);
out.addAll(childOut);
}

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder.java (1)

189-196: ⚡ Quick win

Consider extracting the duplicated optional parameter formatting logic.

The optional parameter rendering logic (lines 189-196) is identical to lines 97-105 in ConstructorHoverBuilder. Consider extracting this into a shared utility method to improve maintainability and ensure consistent formatting across both builders.

♻️ Example refactored approach

Create a shared helper method:

private static void appendParameterNameAndType(
  StringBuilder sb, 
  String displayName, 
  String typesLabel, 
  boolean optional) {
  sb.append("- `").append(displayName);
  if (typesLabel.isEmpty()) {
    sb.append(optional ? "?" : "").append('`');
  } else {
    sb.append("`: ").append(typesLabel).append(optional ? "?" : "");
  }
}

Then both builders can call:

appendParameterNameAndType(sb, p.displayName(lang), typesLabel, p.optional());
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder.java`
around lines 189 - 196, The duplicated optional-parameter formatting in
PlatformMemberHoverBuilder (around the sb.append block using
p.displayName(lang), renderTypeSet(p.types(), lang), and p.optional()) and the
identical block in ConstructorHoverBuilder should be extracted to a shared
helper to avoid duplication and ensure consistency; add a static utility method
(e.g., appendParameterNameAndType) that accepts a StringBuilder, displayName,
typesLabel, and optional boolean and implements the current conditional logic,
then replace the duplicated code blocks in both PlatformMemberHoverBuilder and
ConstructorHoverBuilder with a single call to that helper.
src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/ConstructorHoverBuilderTest.java (1)

180-196: 💤 Low value

Consider adding test coverage for optional parameter without type.

The test buildRendersOptionalParameterWithDefaultValue verifies optional parameters that have a type (TypeSet.of(NUMBER)). Consider adding a test case for an optional parameter with an empty TypeSet to verify the format `ParamName?` is rendered correctly.

📝 Example test case
`@Test`
void buildRendersOptionalParameterWithoutType() {
  // given
  var param = new ParameterDescriptor(
    BilingualString.of("Опц"), TypeSet.EMPTY, true,
    BilingualString.EMPTY, "");
  var sig = new SignatureDescriptor(List.of(param), TypeSet.EMPTY, "");

  // when
  var content = builder.build("X", STRUCTURE, sig, List.of(sig), false, "");

  // then
  assertThat(content.getValue())
    .contains("`Опц?`")
    .doesNotContain("[optionalParameter]");
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/ConstructorHoverBuilderTest.java`
around lines 180 - 196, Add a new unit test (e.g.,
buildRendersOptionalParameterWithoutType) alongside
buildRendersOptionalParameterWithDefaultValue that constructs a
ParameterDescriptor with BilingualString.of("Опц"), TypeSet.EMPTY, true,
BilingualString.EMPTY and empty default value, wraps it in a
SignatureDescriptor, calls builder.build("X", STRUCTURE, sig, List.of(sig),
false, ""), and asserts that content.getValue() contains "`Опц?`" and
doesNotContain("[optionalParameter]"); this verifies the
optional-parameter-without-type formatting.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/VariableSymbolMarkupContentBuilder.java`:
- Around line 245-247: elemJoined currently joins elementTypes.refs() with ", "
which breaks the union formatting contract; in
VariableSymbolMarkupContentBuilder change the stream collect call that builds
elemJoined (the map using inlineTypeLabel(elementTypes, r, lang, code)) to use
Collectors.joining(" | ") so collection element unions render with the same " |
" separator as field types.

---

Nitpick comments:
In
`@src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder.java`:
- Around line 189-196: The duplicated optional-parameter formatting in
PlatformMemberHoverBuilder (around the sb.append block using
p.displayName(lang), renderTypeSet(p.types(), lang), and p.optional()) and the
identical block in ConstructorHoverBuilder should be extracted to a shared
helper to avoid duplication and ensure consistency; add a static utility method
(e.g., appendParameterNameAndType) that accepts a StringBuilder, displayName,
typesLabel, and optional boolean and implements the current conditional logic,
then replace the duplicated code blocks in both PlatformMemberHoverBuilder and
ConstructorHoverBuilder with a single call to that helper.

In
`@src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/ConstructorHoverBuilderTest.java`:
- Around line 180-196: Add a new unit test (e.g.,
buildRendersOptionalParameterWithoutType) alongside
buildRendersOptionalParameterWithDefaultValue that constructs a
ParameterDescriptor with BilingualString.of("Опц"), TypeSet.EMPTY, true,
BilingualString.EMPTY and empty default value, wraps it in a
SignatureDescriptor, calls builder.build("X", STRUCTURE, sig, List.of(sig),
false, ""), and asserts that content.getValue() contains "`Опц?`" and
doesNotContain("[optionalParameter]"); this verifies the
optional-parameter-without-type formatting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f9219932-21e8-46c3-846f-8357d310838d

📥 Commits

Reviewing files that changed from the base of the PR and between c72dcf9 and c737c7a.

📒 Files selected for processing (13)
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/ConstructorHoverBuilder.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/DescriptionFormatter.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/VariableSymbolMarkupContentBuilder.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/providers/CompletionProvider.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/providers/SignatureHelpProvider.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/ConstructorHoverBuilderTest.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/MethodSymbolMarkupContentBuilderTest.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilderTest.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/VariableSymbolMarkupContentBuilderTest.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/VariableSymbolStructureRenderTest.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/providers/CompletionProviderTest.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/providers/SignatureHelpProviderTest.java

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Test Results

 2 952 files  + 6   2 952 suites  +6   1h 23m 50s ⏱️ + 3m 34s
 2 692 tests +10   2 692 ✅ +10  0 💤 ±0  0 ❌ ±0 
16 152 runs  +60  16 152 ✅ +60  0 💤 ±0  0 ❌ ±0 

Results for commit c737c7a. ± Comparison against base commit c72dcf9.

♻️ This comment has been updated with latest results.

Ревью (Copilot/CodeRabbit):
- doc-типы ключей с перечислением через запятую («Строка, Число») разворачиваются
  в union через « | », а не одним токеном;
- doc-only ключи больше не дублируются при union-типах (Структура | Неопределено):
  collectFieldBullets работает по всему TypeSet, ключи дедуплицируются по имени,
  doc-only секция формируется один раз;
- union типов элемента коллекции тоже через « | »;
- общий хелпер HoverParameters.appendNameAndType вместо дублирования логики «?»
  в PlatformMemberHoverBuilder и ConstructorHoverBuilder.

Sonar:
- collectDocOnlyBullets/docFieldsFromTypes сделаны static (S2325);
- явные скобки в тернаре (S864);
- toSignatureInformation разгружен: отрисовка параметра вынесена в appendParameter
  (S1541, цикломатика);
- убран неиспользуемый импорт Trees (S1128);
- в тесте убраны лишние eq(...) (S6068) и комментарии-псевдокод (S125).

Co-Authored-By: Claude Opus 4.8 <[email protected]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/main/java/com/github/_1c_syntax/bsl/languageserver/providers/SignatureHelpProvider.java (1)

537-540: 💤 Low value

Разделитель типов «, » внутри метки параметра неоднозначен.

renderTypes (строки 597‑611) склеивает несколько типов через , , поэтому в метке получается, например, Метод(П: Строка, Число?) — запятая визуально неотличима от разделителя параметров. В hover-карточках (ConstructorHoverBuilder.renderTypeSet) объединение типов рендерится через |. Для единообразия и читаемости стоит использовать | и здесь.

♻️ Возможная правка
   private String renderTypes(TypeSet types, Language lang) {
     if (types == null || types.isEmpty()) {
       return "";
     }
     var sb = new StringBuilder();
     boolean first = true;
     for (var ref : types.refs()) {
       if (!first) {
-        sb.append(", ");
+        sb.append(" | ");
       }
       sb.append(typeService.displayName(ref, lang));
       first = false;
     }
     return sb.toString();
   }

Учтите, что это затронет ожидания существующих тестов signature help.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/java/com/github/_1c_syntax/bsl/languageserver/providers/SignatureHelpProvider.java`
around lines 537 - 540, The parameter type separator is ambiguous in signature
labels; update the code so signature help uses " | " between union types instead
of ", ". Modify the call in SignatureHelpProvider (the lines using
renderTypes(p.types(), lang) and label.append) to use a variant that joins types
with " | " (either by adding an overload/parameter to renderTypes or by
introducing a new helper like renderTypesForSignature that calls the existing
rendering logic but uses " | " as the delimiter), and ensure the produced
typesLabel is appended unchanged to the label; adjust tests that expect the old
", " separator accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@src/main/java/com/github/_1c_syntax/bsl/languageserver/providers/SignatureHelpProvider.java`:
- Around line 537-540: The parameter type separator is ambiguous in signature
labels; update the code so signature help uses " | " between union types instead
of ", ". Modify the call in SignatureHelpProvider (the lines using
renderTypes(p.types(), lang) and label.append) to use a variant that joins types
with " | " (either by adding an overload/parameter to renderTypes or by
introducing a new helper like renderTypesForSignature that calls the existing
rendering logic but uses " | " as the delimiter), and ensure the produced
typesLabel is appended unchanged to the label; adjust tests that expect the old
", " separator accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 599fb71a-0be5-4dc0-9064-cc9d742380ee

📥 Commits

Reviewing files that changed from the base of the PR and between c737c7a and 898e069.

📒 Files selected for processing (7)
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/ConstructorHoverBuilder.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/HoverParameters.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/VariableSymbolMarkupContentBuilder.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/providers/SignatureHelpProvider.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/VariableSymbolMarkupContentBuilderTest.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/VariableSymbolStructureRenderTest.java
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/VariableSymbolStructureRenderTest.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/VariableSymbolMarkupContentBuilder.java

@sonarqubecloud

sonarqubecloud Bot commented Jun 1, 2026

Copy link
Copy Markdown

@nixel2007
nixel2007 enabled auto-merge June 1, 2026 11:22
@nixel2007
nixel2007 merged commit 3fb5c77 into develop Jun 1, 2026
37 checks passed
@nixel2007
nixel2007 deleted the feature/hover-optional-params-and-structure-render branch June 1, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants