Remove spaces between accessor and its parameter list in formatter (KT-30393)
#KT-30393 Fixed
This commit is contained in:
committed by
Nikolay Krasko
parent
0acecb4936
commit
e1f26ffc74
@@ -388,6 +388,9 @@ fun createSpacingBuilder(settings: CodeStyleSettings, builderUtil: KotlinSpacing
|
|||||||
|
|
||||||
before(INDICES).spaces(0)
|
before(INDICES).spaces(0)
|
||||||
before(WHERE_KEYWORD).spaces(1)
|
before(WHERE_KEYWORD).spaces(1)
|
||||||
|
|
||||||
|
afterInside(GET_KEYWORD, PROPERTY_ACCESSOR).spaces(0)
|
||||||
|
afterInside(SET_KEYWORD, PROPERTY_ACCESSOR).spaces(0)
|
||||||
}
|
}
|
||||||
custom {
|
custom {
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
class Test {
|
class Test {
|
||||||
var test: Int
|
var test: Int
|
||||||
get () {
|
get() {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
set (value) {
|
set(value) {
|
||||||
throw NotSupportedException()
|
throw NotSupportedException()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -49,4 +49,8 @@ var prop3: Int // Int
|
|||||||
// this comment is for getter
|
// this comment is for getter
|
||||||
get() = 1
|
get() = 1
|
||||||
// this comment is for setter
|
// this comment is for setter
|
||||||
|
set(value) {}
|
||||||
|
|
||||||
|
val prop4: Int
|
||||||
|
get() = 42
|
||||||
set(value) {}
|
set(value) {}
|
||||||
+5
-1
@@ -52,4 +52,8 @@ var prop3: Int // Int
|
|||||||
// this comment is for getter
|
// this comment is for getter
|
||||||
get() = 1
|
get() = 1
|
||||||
// this comment is for setter
|
// this comment is for setter
|
||||||
set(value) {}
|
set(value) {}
|
||||||
|
|
||||||
|
val prop4: Int
|
||||||
|
get () = 42
|
||||||
|
set (value) {}
|
||||||
+1
-1
@@ -45,7 +45,7 @@ public var varWithAccessors1: Int
|
|||||||
get() {
|
get() {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
set (value: Int) { /**/
|
set(value: Int) { /**/
|
||||||
}
|
}
|
||||||
|
|
||||||
public var varWithAccessors2: Int
|
public var varWithAccessors2: Int
|
||||||
|
|||||||
Reference in New Issue
Block a user