-
Notifications
You must be signed in to change notification settings - Fork 121
Add cachedValueNames parameter to TransferringParametersBetweenClientAndServer diagnostic #3591
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
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThis pull request adds a caching mechanism to the TransferringParametersBetweenClientAndServer diagnostic. It introduces a configurable parameter Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
Comment |
…ntAndServer diagnostic Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
...x/bsl/languageserver/diagnostics/TransferringParametersBetweenClientAndServerDiagnostic.java
Show resolved
Hide resolved
...x/bsl/languageserver/diagnostics/TransferringParametersBetweenClientAndServerDiagnostic.java
Show resolved
Hide resolved
Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
...guageserver/diagnostics/TransferringParametersBetweenClientAndServerDiagnostic_ru.properties
Outdated
Show resolved
Hide resolved
… директива" Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
|
@nixel2007 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a configurable parameter cachedValueNames to the TransferringParametersBetweenClientAndServer diagnostic, allowing developers to suppress warnings for specific parameter names when a corresponding client-side module variable exists. This addresses a common use case in 1C configurations where cached values are intentionally transferred from server to client.
Key Changes
- Added
cachedValueNamesconfiguration parameter to allow ignoring specific parameter names - Implemented AST-based validation to verify matching module-level variables with
&AtClientdirective exist - Optimized parameter matching using uppercase Set for case-insensitive comparison
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
TransferringParametersBetweenClientAndServerDiagnostic.java |
Added cachedValueNames parameter with configure() method, implemented AST traversal to validate client module variables |
TransferringParametersBetweenClientAndServerDiagnosticTest.java |
Added comprehensive test coverage for three scenarios: valid cached variable, missing variable, and non-client variable |
TransferringParametersBetweenClientAndServerDiagnostic_ru.properties |
Added Russian description for the new parameter using correct terminology "директива компиляции" |
TransferringParametersBetweenClientAndServerDiagnostic_en.properties |
Added English description for the new parameter with compiler directive reference |
docs/diagnostics/TransferringParametersBetweenClientAndServer.md |
Added comprehensive Russian documentation with parameter description and code examples |
docs/en/diagnostics/TransferringParametersBetweenClientAndServer.md |
Added comprehensive English documentation with parameter description and code examples |



Implementation Plan for Cached Values on Client
Task Summary
Add configuration parameter to
TransferringParametersBetweenClientAndServerdiagnostic to allow ignoring specific parameter names (e.g.,КэшированныеЗначения) if a corresponding module-level variable exists.Implementation Checklist
cachedValueNamesto the diagnostic class@Clientcompiler directiveRecent Changes
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Summary by CodeRabbit
New Features
cachedValueNamesto customize diagnostic behavior, allowing users to exclude specific parameters from warnings when matching client-side variables with appropriate directives are present.Documentation
✏️ Tip: You can customize this high-level summary in your review settings.