Новый тип и изменения в квалификаторах#161
Conversation
2. Длина в квалификаторах стала long
ПрохождениеОбновление внутреннего представления длины с Изменения
Оценка затрат на проверку кода🎯 3 (Moderate) | ⏱️ ~20 минут Возможно связанные PR
Стихотворение
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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: 2
🧹 Nitpick comments (1)
src/main/java/com/github/_1c_syntax/bsl/types/value/V8ValueType.java (1)
79-80: Нарушение алфавитного порядка:HORIZONTAL_ALIGNследует разместить передVERTICAL_ALIGN.Весь enum выдержан в алфавитном порядке по имени константы, однако
HORIZONTAL_ALIGN(H…) помещён послеVERTICAL_ALIGN(V…). Если это не намеренная логическая группировка, рекомендуется сохранить единый стиль.♻️ Предложение: привести к алфавитному порядку
- VERTICAL_ALIGN("VerticalAlign", "ВертикальноеПоложение"), - HORIZONTAL_ALIGN("HorizontalAlign", "ГоризонтальноеПоложение"); + HORIZONTAL_ALIGN("HorizontalAlign", "ГоризонтальноеПоложение"), + VERTICAL_ALIGN("VerticalAlign", "ВертикальноеПоложение");🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/java/com/github/_1c_syntax/bsl/types/value/V8ValueType.java` around lines 79 - 80, Enum constant order in V8ValueType is out of alphabetical order: move the HORIZONTAL_ALIGN enum constant so it appears before VERTICAL_ALIGN to restore consistent alphabetical ordering; update the enum declaration in V8ValueType by swapping the positions of HORIZONTAL_ALIGN and VERTICAL_ALIGN (ensure commas/terminator remain correct after reordering).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@src/main/java/com/github/_1c_syntax/bsl/types/qualifiers/BinaryDataQualifiers.java`:
- Line 38: The change of the length field to long breaks the public API; restore
source/binary compatibility by keeping the original int-based API: in
BinaryDataQualifiers keep an int length (or add a deprecated int getLength()
that returns (int)length) and add a new accessor getLengthLong() that returns
long; also add an explicit public 3-arg constructor signature matching the old
int parameter (or an explicit factory overload) that delegates to the new
long-based constructor so the Lombok-generated constructor signature remains
available, and ensure existing factory methods create(int) and create(int,
AllowedLength) still delegate correctly to the long-backed implementation; if
you intended to make this breaking change, publish a new major version instead.
In
`@src/main/java/com/github/_1c_syntax/bsl/types/qualifiers/StringQualifiers.java`:
- Around line 72-78: Update the Javadoc in class StringQualifiers for the
string-length qualifier methods: replace the incorrect copied descriptions from
BinaryDataQualifiers so that the `@param` for length reads "Длина строки" (not
"Длина строки base64") and the `@return` reads "Квалификатор строки" (not
"Квалификатор двоичных данных"); apply the same fixes to both the
variable-length and fixed-length factory methods in StringQualifiers so their
parameter and return descriptions correctly refer to strings.
---
Duplicate comments:
In
`@src/main/java/com/github/_1c_syntax/bsl/types/qualifiers/StringQualifiers.java`:
- Line 38: В классе StringQualifiers возврат и поле длины не должны ломать API —
откатить изменение getLength() с long на int и вернуть поле length и
Lombok-генерируемый публичный конструктор к использованию int (как в
BinaryDataQualifiers), либо сохранить новое long-поле под другим именем и
добавить совместимый метод int getLength() (или getLengthInt()) и
соответствующий конструктор/параметр, чтобы существующие вызовы класса
StringQualifiers и его конструктора остались совместимыми.
---
Nitpick comments:
In `@src/main/java/com/github/_1c_syntax/bsl/types/value/V8ValueType.java`:
- Around line 79-80: Enum constant order in V8ValueType is out of alphabetical
order: move the HORIZONTAL_ALIGN enum constant so it appears before
VERTICAL_ALIGN to restore consistent alphabetical ordering; update the enum
declaration in V8ValueType by swapping the positions of HORIZONTAL_ALIGN and
VERTICAL_ALIGN (ensure commas/terminator remain correct after reordering).
src/main/java/com/github/_1c_syntax/bsl/types/qualifiers/BinaryDataQualifiers.java
Show resolved
Hide resolved
src/main/java/com/github/_1c_syntax/bsl/types/qualifiers/StringQualifiers.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main/java/com/github/_1c_syntax/bsl/types/value/V8ValueType.java (1)
40-80:⚠️ Potential issue | 🟡 MinorВыполнение
gradlew precommitне подтвержденоВ чеклисте PR явно отмечено, что обязательный шаг
gradlew precommitне выполнен. Это означает, что форматирование, статический анализ и иные pre-commit проверки могут не пройти при слиянии. Рекомендуется запустить задачу перед мерджем.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/java/com/github/_1c_syntax/bsl/types/value/V8ValueType.java` around lines 40 - 80, The pre-commit checks were not run for this PR; run the project's precommit task locally (gradlew precommit), fix any formatting/static-analysis issues it reports (likely in enum V8ValueType in V8ValueType.java), then commit the resulting changes and push; ensure the enum V8ValueType compiles and passes all checks before updating the PR.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@src/main/java/com/github/_1c_syntax/bsl/types/value/V8ValueType.java`:
- Around line 40-80: The pre-commit checks were not run for this PR; run the
project's precommit task locally (gradlew precommit), fix any
formatting/static-analysis issues it reports (likely in enum V8ValueType in
V8ValueType.java), then commit the resulting changes and push; ensure the enum
V8ValueType compiles and passes all checks before updating the PR.
|



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