Skip to content

Comments

Features/bcs metaborders#3831

Closed
JacobBermudes wants to merge 14 commits into1c-syntax:developfrom
JacobBermudes:features/bcs-metaborders
Closed

Features/bcs metaborders#3831
JacobBermudes wants to merge 14 commits into1c-syntax:developfrom
JacobBermudes:features/bcs-metaborders

Conversation

@JacobBermudes
Copy link

@JacobBermudes JacobBermudes commented Feb 24, 2026

Описание

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

Closes

Чеклист

Общие

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

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

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

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

Summary by CodeRabbit

Release Notes

  • New Features

    • Added MetadataBorders diagnostic to identify metadata access outside permitted boundaries using configurable regex patterns for statements and module names.
  • Documentation

    • Added comprehensive documentation for the MetadataBorders diagnostic in English and Russian, including configuration examples and usage guidance.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 24, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ef025be and 9fbbed8.

⛔ Files ignored due to path filters (1)
  • src/test/resources/diagnostics/MetadataBordersDiagnostic.bsl is excluded by !src/test/resources/**
📒 Files selected for processing (8)
  • docs/diagnostics/MetadataBorders.md
  • docs/en/diagnostics/MetadataBorders.md
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/MetadataBordersDiagnostic.java
  • src/main/resources/com/github/_1c_syntax/bsl/languageserver/configuration/parameters-schema.json
  • src/main/resources/com/github/_1c_syntax/bsl/languageserver/configuration/schema.json
  • src/main/resources/com/github/_1c_syntax/bsl/languageserver/diagnostics/MetadataBordersDiagnostic_en.properties
  • src/main/resources/com/github/_1c_syntax/bsl/languageserver/diagnostics/MetadataBordersDiagnostic_ru.properties
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/MetadataBordersDiagnosticTest.java

📝 Walkthrough

Walkthrough

Introduces a new MetadataBorders diagnostic that detects metadata access outside configured boundaries using statement and file path regex patterns. Includes diagnostic implementation, configuration schema definitions, localization resources, comprehensive documentation in Russian and English, and test coverage.

Changes

Cohort / File(s) Summary
Documentation
docs/diagnostics/MetadataBorders.md, docs/en/diagnostics/MetadataBorders.md
Added Russian and English documentation describing the MetadataBorders diagnostic, including configuration parameters, usage examples, and metadata tables.
Diagnostic Implementation
src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/MetadataBordersDiagnostic.java
New diagnostic class that parses JSON-based pattern configurations, builds regex matchers for statement and file path patterns, and reports violations when metadata access occurs outside configured boundaries.
Configuration Schema
src/main/resources/com/github/_1c_syntax/bsl/languageserver/configuration/parameters-schema.json, src/main/resources/com/github/_1c_syntax/bsl/languageserver/configuration/schema.json
Added MetadataBorders definition to parameters schema and updated schema.json to include MetadataBorders in diagnostic parameters while removing BadWords reference.
Localization Resources
src/main/resources/com/github/_1c_syntax/bsl/languageserver/diagnostics/MetadataBordersDiagnostic_en.properties, src/main/resources/com/github/_1c_syntax/bsl/languageserver/diagnostics/MetadataBordersDiagnostic_ru.properties
Added English and Russian property files with diagnostic message, name, and parameter descriptions for i18n support.
Test Suite
src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/MetadataBordersDiagnosticTest.java
Added comprehensive test class with four test cases covering scenarios without settings, matching in proper modules, matching in wrong modules, and multiple configuration settings.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

hacktoberfest-accepted

Suggested reviewers

  • nixel2007
  • theshadowco

Poem

🐰 A new diagnostic hops into view,
Patrolling metadata borders through and through,
With regex patterns and configs so neat,
Configuration and tests make it complete!
Metadata access now has bounds to respect! 🚀

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@JacobBermudes JacobBermudes deleted the features/bcs-metaborders branch February 24, 2026 08:05
@JacobBermudes JacobBermudes restored the features/bcs-metaborders branch February 24, 2026 08:08
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