Inspection to replace !string.isBlank() with string.isNotBlank()

#KT-40769 Fixed
This commit is contained in:
Enterman
2020-08-07 15:51:14 +08:00
committed by Vladimir Dolzhenko
parent f9a2d01d57
commit d09b20f11d
19 changed files with 156 additions and 8 deletions
@@ -11223,9 +11223,14 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/inspectionsLocal/replaceNegatedIsEmptyWithIsNotEmpty"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), null, true);
}
@TestMetadata("notNegate.kt")
public void testNotNegate() throws Exception {
runTest("idea/testData/inspectionsLocal/replaceNegatedIsEmptyWithIsNotEmpty/notNegate.kt");
@TestMetadata("notNegateBlank.kt")
public void testNotNegateBlank() throws Exception {
runTest("idea/testData/inspectionsLocal/replaceNegatedIsEmptyWithIsNotEmpty/notNegateBlank.kt");
}
@TestMetadata("notNegateEmpty.kt")
public void testNotNegateEmpty() throws Exception {
runTest("idea/testData/inspectionsLocal/replaceNegatedIsEmptyWithIsNotEmpty/notNegateEmpty.kt");
}
@TestMetadata("simple.kt")
@@ -11233,11 +11238,21 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest {
runTest("idea/testData/inspectionsLocal/replaceNegatedIsEmptyWithIsNotEmpty/simple.kt");
}
@TestMetadata("stringIsBlank.kt")
public void testStringIsBlank() throws Exception {
runTest("idea/testData/inspectionsLocal/replaceNegatedIsEmptyWithIsNotEmpty/stringIsBlank.kt");
}
@TestMetadata("stringIsEmpty.kt")
public void testStringIsEmpty() throws Exception {
runTest("idea/testData/inspectionsLocal/replaceNegatedIsEmptyWithIsNotEmpty/stringIsEmpty.kt");
}
@TestMetadata("stringIsNotBlank.kt")
public void testStringIsNotBlank() throws Exception {
runTest("idea/testData/inspectionsLocal/replaceNegatedIsEmptyWithIsNotEmpty/stringIsNotBlank.kt");
}
@TestMetadata("stringIsNotEmpty.kt")
public void testStringIsNotEmpty() throws Exception {
runTest("idea/testData/inspectionsLocal/replaceNegatedIsEmptyWithIsNotEmpty/stringIsNotEmpty.kt");
@@ -9940,11 +9940,21 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
runTest("idea/testData/intentions/invertIfCondition/is.kt");
}
@TestMetadata("isBlank.kt")
public void testIsBlank() throws Exception {
runTest("idea/testData/intentions/invertIfCondition/isBlank.kt");
}
@TestMetadata("isEmpty.kt")
public void testIsEmpty() throws Exception {
runTest("idea/testData/intentions/invertIfCondition/isEmpty.kt");
}
@TestMetadata("isNotBlank.kt")
public void testIsNotBlank() throws Exception {
runTest("idea/testData/intentions/invertIfCondition/isNotBlank.kt");
}
@TestMetadata("isNotEmpty.kt")
public void testIsNotEmpty() throws Exception {
runTest("idea/testData/intentions/invertIfCondition/isNotEmpty.kt");
@@ -10015,11 +10025,21 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
runTest("idea/testData/intentions/invertIfCondition/negatedExpression.kt");
}
@TestMetadata("negatedIsBlank.kt")
public void testNegatedIsBlank() throws Exception {
runTest("idea/testData/intentions/invertIfCondition/negatedIsBlank.kt");
}
@TestMetadata("negatedIsEmpty.kt")
public void testNegatedIsEmpty() throws Exception {
runTest("idea/testData/intentions/invertIfCondition/negatedIsEmpty.kt");
}
@TestMetadata("negatedIsNotBlank.kt")
public void testNegatedIsNotBlank() throws Exception {
runTest("idea/testData/intentions/invertIfCondition/negatedIsNotBlank.kt");
}
@TestMetadata("negatedIsNotEmpty.kt")
public void testNegatedIsNotEmpty() throws Exception {
runTest("idea/testData/intentions/invertIfCondition/negatedIsNotEmpty.kt");