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

Аппендер вывода логов в LanguageClient, если он подключен #3118

Merged
merged 7 commits into from
Jul 28, 2023

Conversation

nixel2007
Copy link
Member

@nixel2007 nixel2007 commented Jul 26, 2023

Описание

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

Closes #3069

Чеклист

Общие

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

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

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

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

@nixel2007
Copy link
Member Author

/rebase

@ghost
Copy link

ghost commented Jul 26, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@github-actions github-actions bot force-pushed the feature/language-client-aware-appender branch from 9ddd0a2 to e9aef17 Compare July 26, 2023 09:26
@github-actions
Copy link

github-actions bot commented Jul 26, 2023

Qodana Community for JVM

14 new problems were found

Inspection name Severity Problems
Statement with empty body 🔶 Warning 5
'@Serial' annotation could be used 🔶 Warning 4
Mismatched query and update of collection 🔶 Warning 2
Mismatched read and write of array 🔶 Warning 1
Nullability and data flow problems 🔶 Warning 1
Redundant character escape 🔶 Warning 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

@nixel2007 nixel2007 added this to the 0.22.0 milestone Jul 26, 2023
@nixel2007 nixel2007 changed the title Feature/language client aware appender Аппендер вывода логов в LanguageClient, если он подключен Jul 26, 2023
@nixel2007 nixel2007 marked this pull request as ready for review July 26, 2023 20:01
@Override
protected void writeOut(ILoggingEvent event) throws IOException {
if (clientHolder != null && clientHolder.isConnected()) {
var languageClient = clientHolder.getClient().orElseThrow();
Copy link
Member

Choose a reason for hiding this comment

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

фуфу. Говоришь что проверяешь наличие, а сам небезопасно Optional вскрываешь

Copy link
Member Author

Choose a reason for hiding this comment

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

isConnected внутри проверяет наличие опшионала :)

Чтобы исключить запуск сервера каждый раз при поднятии спринг-контекста.
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

96.2% 96.2% Coverage
0.0% 0.0% Duplication

@nixel2007 nixel2007 merged commit a14f320 into develop Jul 28, 2023
@nixel2007 nixel2007 deleted the feature/language-client-aware-appender branch July 28, 2023 16:09
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