Skip to content

Обновленный список правил EDT#420

Merged
theshadowco merged 1 commit intodevelopfrom
updateEdtRules260323
Mar 23, 2026
Merged

Обновленный список правил EDT#420
theshadowco merged 1 commit intodevelopfrom
updateEdtRules260323

Conversation

@theshadowco
Copy link
Copy Markdown
Member

No description provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 23, 2026

Walkthrough

Обновлены ожидаемые значения количества правил в тестовых методах класса RuleDefinitionTest.java. Значения размера правил изменены с 281/285 на 309/313 соответственно, при сохранении остальных проверок целостности и ограничений.

Changes

Cohort / File(s) Summary
Обновление ожидаемых значений в тестах
src/test/java/com/github/_1c_syntax/bsl/sonar/ext_issues/RuleDefinitionTest.java
Увеличены ожидаемые количества правил в четырёх методах тестирования: testDefine (281→309), testEmptyExternalFilePath (285→313), testExternalFile (281→309), testExternalFileWithErrors (285→313).

Possibly related PRs

  • 1c-syntax/sonar-bsl-plugin-community#400: Модифицирует тот же файл теста для обновления ожидаемых значений количества правил в репозитории.

Poem

🐰 Числа в тестах изменились вдруг,
Правил стало больше, вот потеха!
С 281 до 309 взлетели строки,
Кролик прыгает с улыбкой в углы,
Где ассерции танцуют в тоске! 🎉


🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive Описание отсутствует, что затрудняет понимание причин и контекста обновления количества правил. Добавьте описание, объясняющее причины обновления количества правил с 281/285 на 309/313.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed Заголовок точно описывает основное изменение — обновление ожидаемого количества правил EDT в тестовых случаях.

✏️ 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 updateEdtRules260323

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/test/java/com/github/_1c_syntax/bsl/sonar/ext_issues/RuleDefinitionTest.java (1)

49-49: Вынесите ожидаемые размеры в именованные константы для упрощения поддержки.

Сейчас значения 309 и 313 повторяются в нескольких тестах. Это не ошибка, но константы упростят будущие обновления набора правил.

♻️ Вариант рефакторинга
 class RuleDefinitionTest {
 
+  private static final int DEFAULT_RULES_COUNT = 309;
+  private static final int EXTERNAL_RULES_COUNT = 313;
+
   private final Reporter reporter = EdtReporter.create();
@@
-    assertThat(repository.rules()).hasSize(309);
+    assertThat(repository.rules()).hasSize(DEFAULT_RULES_COUNT);
@@
-    assertThat(repository.rules()).hasSize(309);
+    assertThat(repository.rules()).hasSize(DEFAULT_RULES_COUNT);
@@
-    assertThat(repository.rules()).hasSize(313);
+    assertThat(repository.rules()).hasSize(EXTERNAL_RULES_COUNT);
@@
-    assertThat(repository.rules()).hasSize(309);
+    assertThat(repository.rules()).hasSize(DEFAULT_RULES_COUNT);

Also applies to: 66-66, 89-89, 112-112

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/test/java/com/github/_1c_syntax/bsl/sonar/ext_issues/RuleDefinitionTest.java`
at line 49, In RuleDefinitionTest, replace hard-coded numeric literals used in
assertions (e.g., assertThat(repository.rules()).hasSize(309) and the
occurrences of 313) with named constants defined at the top of the class (for
example private static final int EXPECTED_RULES_COUNT_309 = 309 and private
static final int EXPECTED_RULES_COUNT_313 = 313 or more descriptive names), then
use those constants in all assertions that currently use 309 or 313; update
every assertion that calls assertThat(repository.rules()).hasSize(...) to
reference the new constants so future updates require changing a single constant
in the class.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@src/test/java/com/github/_1c_syntax/bsl/sonar/ext_issues/RuleDefinitionTest.java`:
- Line 49: In RuleDefinitionTest, replace hard-coded numeric literals used in
assertions (e.g., assertThat(repository.rules()).hasSize(309) and the
occurrences of 313) with named constants defined at the top of the class (for
example private static final int EXPECTED_RULES_COUNT_309 = 309 and private
static final int EXPECTED_RULES_COUNT_313 = 313 or more descriptive names), then
use those constants in all assertions that currently use 309 or 313; update
every assertion that calls assertThat(repository.rules()).hasSize(...) to
reference the new constants so future updates require changing a single constant
in the class.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 99d52667-2db3-4e84-ab49-70485e3c4c03

📥 Commits

Reviewing files that changed from the base of the PR and between b0fe900 and 75d0ec6.

⛔ Files ignored due to path filters (1)
  • src/main/resources/edt.json is excluded by !**/*.json
📒 Files selected for processing (1)
  • src/test/java/com/github/_1c_syntax/bsl/sonar/ext_issues/RuleDefinitionTest.java

@sonarqubecloud
Copy link
Copy Markdown

@theshadowco theshadowco merged commit e9f8a37 into develop Mar 23, 2026
18 checks passed
@theshadowco theshadowco deleted the updateEdtRules260323 branch March 23, 2026 04:51
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.

1 participant