Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Правило - "Путь к данным" не заполнен у полей формы #1831

Merged
merged 9 commits into from
Oct 6, 2021

Conversation

artbear
Copy link
Contributor

@artbear artbear commented Sep 19, 2021

Описание

Реализована проверка неверных путей для элементов формы, в т.ч. и для полей динамического списка

Связанные задачи

Closes #1122
Closes #1830

Чеклист

Общие

  • Ветка PR обновлена из develop
  • Отладочные, закомментированные и прочие, не имеющие смысла участки кода удалены
  • Изменения покрыты тестами
  • Обязательные действия перед коммитом выполнены (запускал команду gradlew precommit)

Для диагностик

  • Описание диагностики заполнено для обоих языков (присутствуют файлы для обоих языков, для русского заполнено все подробно, перевод на английский можно опустить)

Дополнительно


form.getData().getPlainChildren().stream()
.filter(WrongDataPathForFormElementsDiagnostic::wrongDataPath)
.forEach(formItem -> diagnosticStorage.addDiagnostic(range,
Copy link
Member

Choose a reason for hiding this comment

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

Почему ты высчитываешь range от модуля формы, но кидаешь его на uri модуля приложения?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Исправил, теперь и модули форм анализируются, если они есть.
@nixel2007

scope = DiagnosticScope.BSL,
modules = {
// todo переделать, когда появится привязка к объектам метаданных
ModuleType.ManagedApplicationModule
Copy link
Member

Choose a reason for hiding this comment

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

В такой настройке диагностика будет всегда кидать ошибку на модуль приложения. Лучше кидать ошибку на модуль формы, если он есть, и на модуль приложения только для остальных случаев.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Исправил, теперь и модули форм анализируются, если они есть.

а не только модуль приложения
если модуля у формы нет, замечание вешается на модуль приложения
@artbear
Copy link
Contributor Author

artbear commented Sep 24, 2021

@nixel2007 Замечания исправлены. Посмотришь ПР ?

@nixel2007 nixel2007 merged commit 5117252 into 1c-syntax:develop Oct 6, 2021
@artbear artbear deleted the WrongDataPathForFormElements branch October 7, 2021 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants