Convert ReplaceSubstringIntention to ReplaceSubstringInspection
Relates to #KT-31502
This commit is contained in:
@@ -1 +0,0 @@
|
||||
org.jetbrains.kotlin.idea.intentions.ReplaceSubstringWithDropLastIntention
|
||||
@@ -1,7 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A(val x: String)
|
||||
|
||||
fun foo(a: A) {
|
||||
a.x.substring<caret>(0, a.x.length - 5)
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A(val x: String)
|
||||
|
||||
fun foo(a: A) {
|
||||
a.x.dropLast(5)
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
// IS_APPLICABLE: false
|
||||
|
||||
class A() {
|
||||
fun bar(): String = null!!
|
||||
}
|
||||
|
||||
fun foo(a: A) {
|
||||
a.bar().substring<caret>(0, a.bar().length - 5)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
// IS_APPLICABLE: false
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substring<caret>(3, s.length - 5)
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substring<caret>(0, s.length - 5)
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.dropLast(5)
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substring<caret>(0, s.length - 5);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.dropLast(5);
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
org.jetbrains.kotlin.idea.intentions.ReplaceSubstringWithIndexingOperationIntention
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
"abc".substring<caret>(1, 2)
|
||||
}
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
"abc"[1]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
"abc".substring<caret>(0, 1)
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
"abc"[0]
|
||||
}
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
// IS_APPLICABLE: false
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
"abc".substring<caret>(0, 10)
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
org.jetbrains.kotlin.idea.intentions.ReplaceSubstringWithSubstringAfterIntention
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A(val x: String)
|
||||
|
||||
fun foo(a: A) {
|
||||
a.x.substring<caret>(a.x.indexOf('x'))
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A(val x: String)
|
||||
|
||||
fun foo(a: A) {
|
||||
a.x.substringAfter('x')
|
||||
}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
// IS_APPLICABLE: false
|
||||
|
||||
class A() {
|
||||
fun bar(): String = null!!
|
||||
}
|
||||
|
||||
fun foo(a: A) {
|
||||
a.bar().substring<caret>(a.bar().indexOf('x'))
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substring<caret>(s.indexOf('x'))
|
||||
}
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substringAfter('x')
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substring<caret>(s.indexOf('x'));
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substringAfter('x');
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
org.jetbrains.kotlin.idea.intentions.ReplaceSubstringWithSubstringBeforeIntention
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A(val x: String)
|
||||
|
||||
fun foo(a: A) {
|
||||
a.x.substring<caret>(0, a.x.indexOf('x'))
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A(val x: String)
|
||||
|
||||
fun foo(a: A) {
|
||||
a.x.substringBefore('x')
|
||||
}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
// IS_APPLICABLE: false
|
||||
|
||||
class A() {
|
||||
fun bar(): String = null!!
|
||||
}
|
||||
|
||||
fun foo(a: A) {
|
||||
a.bar().substring<caret>(0, a.bar().indexOf('x'))
|
||||
}
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
// IS_APPLICABLE: false
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substring<caret>(1, s.indexOf('x'))
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substring<caret>(0, s.indexOf('x'))
|
||||
}
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substringBefore('x')
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substring<caret>(0, s.indexOf('x'));
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substringBefore('x');
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
org.jetbrains.kotlin.idea.intentions.ReplaceSubstringWithTakeIntention
|
||||
@@ -1,8 +0,0 @@
|
||||
// IS_APPLICABLE: false
|
||||
// WITH_RUNTIME
|
||||
|
||||
const val x = 0
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substring<caret>(x, 10)
|
||||
}
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
// IS_APPLICABLE: false
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substring<caret>(1 - 1, 10)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
// IS_APPLICABLE: false
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substring<caret>(1, 10)
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substring<caret>(0, 10)
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.take(10)
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.substring<caret>(0, 10);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(s: String) {
|
||||
s.take(10);
|
||||
}
|
||||
Reference in New Issue
Block a user