Правило Отключение проверок всего модуля - DisableAllDiagnostics - ГОТОВО#3075
Draft
artbear wants to merge 6 commits into1c-syntax:developfrom
Draft
Правило Отключение проверок всего модуля - DisableAllDiagnostics - ГОТОВО#3075artbear wants to merge 6 commits into1c-syntax:developfrom
artbear wants to merge 6 commits into1c-syntax:developfrom
Conversation
|
Kudos, SonarCloud Quality Gate passed! |
theshadowco
reviewed
Sep 11, 2023
| <!-- Блоки выше заполняются автоматически, не трогать --> | ||
| ## Описание диагностики | ||
| <!-- Описание диагностики заполняется вручную. Необходимо понятным языком описать смысл и схему работу --> | ||
| Правило срабатывает на отключение проверки кода всего модуля через специальный комментарий `// BSLLS-off` или `BSLLS-выкл` |
Member
There was a problem hiding this comment.
Сначала описать проблему и варианты решения, а логику работы описать ниже
|
|
||
| private final Map<DiagnosticCode, List<Range<Integer>>> diagnosticIgnorance = new HashMap<>(); | ||
| private final Map<DiagnosticCode, Deque<Integer>> ignoranceStack = new HashMap<>(); | ||
| private final List<org.eclipse.lsp4j.Range> ignoreOffList = new ArrayList<>(); |
| Deque<Integer> stack = ignoranceStack.computeIfAbsent(key, s -> new ArrayDeque<>()); | ||
| stack.push(comment.getLine()); | ||
|
|
||
| if (ignoreOff.equals(IGNORE_ALL_OFF)){ |
| } | ||
|
|
||
| @Test | ||
| void testOnAndOff() { |
Member
There was a problem hiding this comment.
добавить тесты
- ТОЛЬКО отключение в начале модуля
- несколько включений \ отлкючений в модуле
nixel2007
reviewed
Dec 26, 2023
|
|
||
| private final Map<DiagnosticCode, List<Range<Integer>>> diagnosticIgnorance = new HashMap<>(); | ||
| private final Map<DiagnosticCode, Deque<Integer>> ignoranceStack = new HashMap<>(); | ||
| private final List<org.eclipse.lsp4j.Range> ignoreOffList = new ArrayList<>(); |
Member
There was a problem hiding this comment.
Не вижу причин хранить это отдельно. Вся инфа есть в Data классе по ключу DiagnosticCode("all")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.









Описание
Связанные задачи
Closes #3074
Чеклист
Общие
gradlew precommit)Для диагностик
Дополнительно