You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Defines the imports layout. There are predefined layouts like "ascii" or "idea", as well as a custom layout.
94
-
# The predefined layouts are temporary and will be deprecated in the future, once Kotlin plugin supports EditorConfig property for imports layout.
95
-
# The custom layout can be composed by the following symbols:
93
+
# Defines the imports layout. The layout can be composed by the following symbols:
96
94
# "*" - wildcard. There must be at least one entry of a single wildcard to match all other imports. Matches anything after a specified symbol/import as well.
97
95
# "|" - blank line. Supports only single blank lines between imports. No blank line is allowed in the beginning or end of the layout.
98
96
# "^" - alias import, e.g. "^android.*" will match all android alias imports, "^" will match all other alias imports.
99
97
# import paths - these can be full paths, e.g. "java.util.List.*" as well as wildcard paths, e.g. "kotlin.**"
100
-
# Examples:
101
-
kotlin_imports_layout=ascii # alphabetical with capital letters before lower case letters (e.g. Z before a), no blank lines
102
-
kotlin_imports_layout=idea # default IntelliJ IDEA style, same as "ascii", but with "java", "javax", "kotlin" and alias imports in the end of the imports list
# Alternatively ij_kotlin_imports_layout name can be used, in order to set an imports layout for both ktlint and IDEA via a single property
105
-
# Note: this is not yet implemented on IDEA side, so it only takes effect for ktlint
106
-
ij_kotlin_imports_layout=*
98
+
# Examples (we use ij_kotlin_imports_layout to set an imports layout for both ktlint and IDEA via a single property):
99
+
ij_kotlin_imports_layout=* # alphabetical with capital letters before lower case letters (e.g. Z before a), no blank lines
100
+
ij_kotlin_imports_layout=*,java.**,javax.**,kotlin.**,^ # default IntelliJ IDEA style, same as alphabetical, but with "java", "javax", "kotlin" and alias imports in the end of the imports list
Copy file name to clipboardexpand all lines: ktlint-ruleset-standard/src/test/kotlin/com/pinterest/ktlint/ruleset/standard/importordering/ImportOrderingRuleAsciiTest.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -297,7 +297,7 @@ class ImportOrderingRuleAsciiTest {
Copy file name to clipboardexpand all lines: ktlint-ruleset-standard/src/test/kotlin/com/pinterest/ktlint/ruleset/standard/importordering/ImportOrderingRuleIdeaTest.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -353,7 +353,7 @@ class ImportOrderingRuleIdeaTest {
0 commit comments