Don't include unindented comments preceding a function into its text range

#KT-10591 Fixed
This commit is contained in:
Dmitry Jemerov
2018-01-12 15:48:01 +01:00
parent 075541da21
commit 106e1b8661
8 changed files with 130 additions and 60 deletions
@@ -1,10 +1,8 @@
package format.test
// TODO: Comment on first column shouldn't be formatted, but now there's no way to adjust rule for the first comment in parent declaration.
class LineComments {
// Should not be formatted
// Format
// Should not be formatted
// Format
// Format
fun test() {
}
@@ -1,10 +1,8 @@
package format.test
// TODO: Comment on first column shouldn't be formatted, but now there's no way to adjust rule for the first comment in parent declaration.
class LineComments {
// Should not be formatted
// Format
// Should not be formatted
// Format
// Format
fun test() {
}
@@ -1,7 +1,5 @@
package format.test
// TODO: Comment on first column shouldn't be formatted, but now there's no way to adjust rule for the first comment in parent declaration.
class LineComments {
// Should not be formatted
// Format
+6
View File
@@ -0,0 +1,6 @@
object Test {
// some
fun test() {
<caret>
}
}
+5
View File
@@ -0,0 +1,5 @@
object Test {
// some
fun test() {<caret>
}
}