Skip to content

Commit 3dc2eed

Browse files
vRallevmeta-codesync[bot]
authored andcommitted
Explicit Kotlin import layout (#571)
Summary: Specify an explicit import layout instead of relying on the Kotlin Official default. The Kotlin Official style uses `ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^`. The new explicit import layout changes it to how ktfmt formats code. `.editorconfig-kotlinlang` has already applied the same setting. Pull Request resolved: #571 Reviewed By: cortinico Differential Revision: D88870307 Pulled By: hick209 fbshipit-source-id: 965a76904feca661b0ade7c9deb6ea8f890f1421
1 parent 7b5b665 commit 3dc2eed

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
1414

1515
### Added
1616
- Support for `else if` guard conditions (https://github.com/facebook/ktfmt/pull/563)
17+
- Explicit Kotlin import layout for the default and Google specific editorconfig files to match ktfmt's style. The same layout was already applied to the Kotlin Lang editorconfig (https://github.com/facebook/ktfmt/pull/571)
1718

1819

1920
## [0.59]

docs/editorconfig/.editorconfig-default

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ ij_kotlin_field_annotation_wrap = split_into_lines
4646
ij_kotlin_finally_on_new_line = false
4747
ij_kotlin_if_rparen_on_new_line = false
4848
ij_kotlin_import_nested_classes = false
49+
ij_kotlin_imports_layout = *
4950
ij_kotlin_insert_whitespaces_in_simple_one_line_method = true
5051
ij_kotlin_keep_blank_lines_before_right_brace = 2
5152
ij_kotlin_keep_blank_lines_in_code = 2

docs/editorconfig/.editorconfig-google

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ ij_kotlin_field_annotation_wrap = split_into_lines
4646
ij_kotlin_finally_on_new_line = false
4747
ij_kotlin_if_rparen_on_new_line = false
4848
ij_kotlin_import_nested_classes = false
49+
ij_kotlin_imports_layout = *
4950
ij_kotlin_insert_whitespaces_in_simple_one_line_method = true
5051
ij_kotlin_keep_blank_lines_before_right_brace = 2
5152
ij_kotlin_keep_blank_lines_in_code = 2

0 commit comments

Comments
 (0)