-
Notifications
You must be signed in to change notification settings - Fork 0
Fix/formatter indent #86
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
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.
Copilot reviewed 46 out of 46 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
src/main/kotlin/org/domaframework/doma/intellij/formatter/block/SqlOtherBlock.kt:60
- [nitpick] The function name 'createIntendLen' appears to contain a misspelling; consider renaming it to 'createIndentLen' to improve clarity.
private fun createIntendLen(): Int {
src/main/kotlin/org/domaframework/doma/intellij/formatter/SqlFormattingModelBuilder.kt:95
- Review the change in token mapping from white space to 'SqlTypes.NUMBER' and 'SqlTypes.STRING' for spacing configuration to ensure it aligns with the intended formatting behavior.
.withSpacing( SqlTypes.NUMBER, SqlTypes.COMMA, SqlCustomSpacingBuilder.nonSpacing,
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.
Copilot reviewed 46 out of 46 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
src/main/kotlin/org/domaframework/doma/intellij/formatter/SqlFormattingModelBuilder.kt:94
- The spacing rule change from using TokenType.WHITE_SPACE to SqlTypes.NUMBER might be unintended; please double-check if this correctly reflects the desired token spacing behavior.
.withSpacing( SqlTypes.NUMBER, SqlTypes.COMMA, SqlCustomSpacingBuilder.nonSpacing, )
src/main/kotlin/org/domaframework/doma/intellij/formatter/block/SqlRightPatternBlock.kt:97
- Ensure that the updated logic in 'isNewLine' (previously 'isNeedBeforeWhiteSpace') is thoroughly covered by unit tests to validate that multi-column update formatting works as intended.
fun isNewLine(lastGroup: SqlBlock?): Boolean =
There is no problem with this change because the parser does not require spacing between TokenType.WHITE_SPACE and other tokens.
Test case confirms that multiple columns are updated and that the column definition format is correct |
Fixed unintended SQL formatting behavior