Fix KT-16725; Remove spaces between array indices
This commit is contained in:
committed by
Dmitry Jemerov
parent
46ce9a6946
commit
4acb95acb5
@@ -257,6 +257,8 @@ fun createSpacingBuilder(settings: CodeStyleSettings, builderUtil: KotlinSpacing
|
|||||||
|
|
||||||
around(BY_KEYWORD).spaces(1)
|
around(BY_KEYWORD).spaces(1)
|
||||||
betweenInside(IDENTIFIER, PROPERTY_DELEGATE, PROPERTY).spaces(1)
|
betweenInside(IDENTIFIER, PROPERTY_DELEGATE, PROPERTY).spaces(1)
|
||||||
|
|
||||||
|
before(INDICES).spaces(0)
|
||||||
}
|
}
|
||||||
custom {
|
custom {
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
val array = emptyArray<Any>()
|
||||||
|
val foo = array[0]
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
val array = emptyArray<Any>()
|
||||||
|
val foo = array [0]
|
||||||
@@ -596,6 +596,12 @@ public class FormatterTestGenerated extends AbstractFormatterTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("SpaceBeforeIndices.after.kt")
|
||||||
|
public void testSpaceBeforeIndices() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceBeforeIndices.after.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("SpacedInsideParans.after.kt")
|
@TestMetadata("SpacedInsideParans.after.kt")
|
||||||
public void testSpacedInsideParans() throws Exception {
|
public void testSpacedInsideParans() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpacedInsideParans.after.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpacedInsideParans.after.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user