From 29a87e4f7f091dfbc39bc5d666d8845d6dd4f2eb Mon Sep 17 00:00:00 2001 From: Ivan Semenov Date: Wed, 5 Nov 2025 13:23:08 +0100 Subject: [PATCH] style [*]: restore the Kotlin code style that was agreed upon previously The old format was overridden by old Kotlin default format during editorconfig migration, which caused line wrapping to be disabled This commit moves all Kotlin codestyle configuration to editorconfig, which becomes the single source of truth GitOrigin-RevId: 91451d14417f3981dd44809e1f9873df520fe8b0 --- .editorconfig | 26 +++++++++++++++++++++++++- .idea/codeStyles/Project.xml | 32 -------------------------------- 2 files changed, 25 insertions(+), 33 deletions(-) diff --git a/.editorconfig b/.editorconfig index ca7fc85621f5..87b594873bda 100644 --- a/.editorconfig +++ b/.editorconfig @@ -15,4 +15,28 @@ ij_any_block_comment_at_first_column = false ij_any_line_comment_at_first_column = false ij_javascript_force_semicolon_style = true ij_javascript_use_semicolon_after_statement = false -ij_kotlin_code_style_defaults = KOTLIN_OLD_DEFAULTS \ No newline at end of file + +;======Kotlin===== +[{*.kt,*.kts}] +ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL + +ij_kotlin_else_on_new_line = true +ij_kotlin_while_on_new_line = true +ij_kotlin_catch_on_new_line = true +ij_kotlin_finally_on_new_line = true +ij_kotlin_line_break_after_multiline_when_entry = false + +; should break, but it is not configurable for now +ij_kotlin_align_multiline_binary_operation = true + +ij_kotlin_align_multiline_parameters_in_calls = true +ij_kotlin_align_multiline_extends_list = true + +; so that a comma is appended to the multiline function parameter list +ij_kotlin_allow_trailing_comma = true + +; the official styleguide forces newlines and we don't want to reformat the whole repo +ij_kotlin_call_parameters_right_paren_on_new_line = unset +ij_kotlin_call_parameters_new_line_after_left_paren = unset +ij_kotlin_if_rparen_on_new_line = unset +;=====Kotlin===== \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index bae93b457881..375b3dfb48a8 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -34,18 +34,6 @@ -