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

Feature/export variables #1232

Merged
merged 9 commits into from
Jun 9, 2020

Conversation

alkoleft
Copy link
Contributor

@alkoleft alkoleft commented Jun 1, 2020

Описание

  • Диагностика "Запрет экспортных глобальных переменных модуля"
  • Визитер для символьного дерева
  • Абстрактная диагностика на основе перебора Symbol tree

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

Closes:
Closes #1043
Closes #1208

Чеклист

Общие

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

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

  • Описание диагностики заполнено для обоих языков (перевод на английский не обязателен)

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

@nixel2007
Copy link
Member

Божественно

@@ -0,0 +1,2 @@
diagnosticMessage=<Message>
Copy link
Member

Choose a reason for hiding this comment

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

Надо дозаполнить этот файл и перезапустить precommit для обновления доков и схемы

Copy link
Contributor Author

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.

Поправил описание диагностики

}

@Override
public void visitVariable(VariableSymbol variable) {
Copy link
Member

@nixel2007 nixel2007 Jun 2, 2020

Choose a reason for hiding this comment

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

я же правильно понимаю, что в общем случае надо еще вставлять вызов super.visitSomething в конец метода? конкретно тут не надо, но вообще для продолжения обхода дерева (по аналогии с наследниками AbstractVisitorDiagnostic) - надо

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Да все верно

@Test
void test() throws IOException {

String content = "Перем Перем1 Экспорт,\n Перем2\n,Перем53 \nЭкспорт\n\n\n";
Copy link
Member

Choose a reason for hiding this comment

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

Перенеси содержимое в файл, пожалуйста.

По файлам работает ряд smoke-тестов, который позволяет отлавливать дополнительные косяки на интеграции, а в таком виде эта возможность теряется.

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 nixel2007 merged commit f37f584 into 1c-syntax:develop Jun 9, 2020
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