добавлено чтение измерений перерасчетов#630
Conversation
|
Warning Review limit reached
Next review available in: 49 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (7)
📒 Files selected for processing (12)
📝 WalkthroughWalkthroughAdds ChangesRecalculationDimension Feature
Build and IDE Config
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/main/java/com/github/_1c_syntax/bsl/reader/common/context/MDReaderContext.java (1)
104-120: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueReduce repeated
MDOType.fromValue(...)lookups.Both branches call
MDOType.fromValue(...)twice for the same key. Resolving once into a local improves readability and avoids redundant work.♻️ Example for the DESIGNER branch
- var parentFolder = currentPath.getParent().getFileName().toString(); - if (MDOType.fromValue(parentFolder).isPresent() - && MDOType.fromValue(parentFolder).get() == MDOType.RECALCULATION) { + var parentFolder = currentPath.getParent().getFileName().toString(); + if (MDOType.fromValue(parentFolder).filter(t -> t == MDOType.RECALCULATION).isPresent()) { realClass = RecalculationDimension.class; realClassName = realClass.getSimpleName(); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/main/java/com/github/_1c_syntax/bsl/reader/common/context/MDReaderContext.java` around lines 104 - 120, The `MDReaderContext` dimension-type resolution repeats `MDOType.fromValue(...)` for the same value in both the DESIGNER and non-DESIGNER branches. Update the logic around `realClass`/`realClassName` to resolve the `MDOType` once into a local variable for `parentFolder` and `lastParent`, then reuse that result in the `RECALCULATION` check to make the code clearer and avoid redundant lookups.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/test/java/com/github/_1c_syntax/bsl/examples/ValueTypeTest.java`:
- Around line 120-122: Replace the Java assert-based null checks in
ValueTypeTest with AssertJ assertions so they always execute during tests.
Update the checks around isEDT and examplePackName to use the existing AssertJ
style used in the test suite, keeping the same validation intent inside the test
method that reads values from ArgumentsAccessor.
---
Nitpick comments:
In
`@src/main/java/com/github/_1c_syntax/bsl/reader/common/context/MDReaderContext.java`:
- Around line 104-120: The `MDReaderContext` dimension-type resolution repeats
`MDOType.fromValue(...)` for the same value in both the DESIGNER and
non-DESIGNER branches. Update the logic around `realClass`/`realClassName` to
resolve the `MDOType` once into a local variable for `parentFolder` and
`lastParent`, then reuse that result in the `RECALCULATION` check to make the
code clearer and avoid redundant lookups.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ea6e6231-d8b0-45c9-a77b-d3a6816a25f0
⛔ Files ignored due to path filters (7)
src/test/resources/fixtures/mdclasses/CalculationRegisters.РегистрРасчета1.jsonis excluded by!src/test/resources/**src/test/resources/fixtures/mdclasses/CalculationRegisters.РегистрРасчета1_edt.jsonis excluded by!src/test/resources/**src/test/resources/fixtures/mdclasses/Configuration.jsonis excluded by!src/test/resources/**src/test/resources/fixtures/mdclasses/Configuration_edt.jsonis excluded by!src/test/resources/**src/test/resources/fixtures/mdclasses_3_24/Configuration_edt.jsonis excluded by!src/test/resources/**src/test/resources/fixtures/mdclasses_3_25/CalculationRegisters.РегистрРасчета1.jsonis excluded by!src/test/resources/**src/test/resources/fixtures/mdclasses_3_25/CalculationRegisters.РегистрРасчета1_edt.jsonis excluded by!src/test/resources/**
📒 Files selected for processing (12)
.idea/gradle.xml.idea/vcs.xmlbuild.gradle.ktssrc/main/java/com/github/_1c_syntax/bsl/mdo/children/Recalculation.javasrc/main/java/com/github/_1c_syntax/bsl/mdo/children/RecalculationDimension.javasrc/main/java/com/github/_1c_syntax/bsl/reader/common/context/MDReaderContext.javasrc/main/java/com/github/_1c_syntax/bsl/reader/common/xstream/ExtendReaderWrapper.javasrc/main/java/com/github/_1c_syntax/bsl/reader/designer/converter/MdoReferenceConverter.javasrc/test/java/com/github/_1c_syntax/bsl/examples/ValueTypeTest.javasrc/test/java/com/github/_1c_syntax/bsl/mdo/CalculationRegisterTest.javasrc/test/java/com/github/_1c_syntax/bsl/smoke/RightTest.javasrc/test/java/com/github/_1c_syntax/bsl/test_utils/MDTestUtils.java
|
Cc @sfaqer |
5ee1081 to
45146c9
Compare
|




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