Code cleanup: removed redundant semicolons
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@ abstract class AbstractAndroidCompletionTest : KotlinAndroidTestCase() {
|
||||
|
||||
fun doTest(path: String?) {
|
||||
getResourceDirs(path).forEach { myFixture.copyDirectoryToProject(it.name, it.name) }
|
||||
val virtualFile = myFixture.copyFileToProject(path + getTestName(true) + ".kt", "src/" + getTestName(true) + ".kt");
|
||||
val virtualFile = myFixture.copyFileToProject(path + getTestName(true) + ".kt", "src/" + getTestName(true) + ".kt")
|
||||
myFixture.configureFromExistingVirtualFile(virtualFile)
|
||||
val fileText = FileUtil.loadFile(File(path + getTestName(true) + ".kt"), true)
|
||||
testCompletion(fileText, JvmPlatform, { completionType, count -> myFixture.complete(completionType, count) })
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ abstract class AbstractAndroidFindUsagesTest : KotlinAndroidTestCase() {
|
||||
|
||||
val f = myFixture!!
|
||||
getResourceDirs(path).forEach { myFixture.copyDirectoryToProject(it.name, it.name) }
|
||||
val virtualFile = f.copyFileToProject(path + getTestName(true) + ".kt", "src/" + getTestName(true) + ".kt");
|
||||
val virtualFile = f.copyFileToProject(path + getTestName(true) + ".kt", "src/" + getTestName(true) + ".kt")
|
||||
f.configureFromExistingVirtualFile(virtualFile)
|
||||
|
||||
val targetElement = TargetElementUtil.findTargetElement(
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ abstract class AbstractAndroidGotoTest : KotlinAndroidTestCase() {
|
||||
fun doTest(path: String) {
|
||||
val f = myFixture!!
|
||||
getResourceDirs(path).forEach { myFixture.copyDirectoryToProject(it.name, it.name) }
|
||||
val virtualFile = f.copyFileToProject(path + getTestName(true) + ".kt", "src/" + getTestName(true) + ".kt");
|
||||
val virtualFile = f.copyFileToProject(path + getTestName(true) + ".kt", "src/" + getTestName(true) + ".kt")
|
||||
f.configureFromExistingVirtualFile(virtualFile)
|
||||
|
||||
val expression = TargetElementUtil.findReference(f.editor, f.caretOffset)!!.element as KtElement
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ abstract class AbstractAndroidLayoutRenameTest : KotlinAndroidTestCase() {
|
||||
fun doTest(path: String) {
|
||||
val f = myFixture!!
|
||||
getResourceDirs(path).forEach { myFixture.copyDirectoryToProject(it.name, it.name) }
|
||||
val virtualFile = f.copyFileToProject(path + getTestName(true) + ".kt", "src/" + getTestName(true) + ".kt");
|
||||
val virtualFile = f.copyFileToProject(path + getTestName(true) + ".kt", "src/" + getTestName(true) + ".kt")
|
||||
f.configureFromExistingVirtualFile(virtualFile)
|
||||
|
||||
val completionEditor = InjectedLanguageUtil.getEditorForInjectedLanguageNoCommit(f.editor, f.file)
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ abstract class AbstractAndroidRenameTest : KotlinAndroidTestCase() {
|
||||
fun doTest(path: String) {
|
||||
val f = myFixture!!
|
||||
getResourceDirs(path).forEach { myFixture.copyDirectoryToProject(it.name, it.name) }
|
||||
val virtualFile = f.copyFileToProject(path + getTestName(true) + ".kt", "src/" + getTestName(true) + ".kt");
|
||||
val virtualFile = f.copyFileToProject(path + getTestName(true) + ".kt", "src/" + getTestName(true) + ".kt")
|
||||
f.configureFromExistingVirtualFile(virtualFile)
|
||||
|
||||
val completionEditor = InjectedLanguageUtil.getEditorForInjectedLanguageNoCommit(f.editor, f.file)
|
||||
|
||||
@@ -112,7 +112,7 @@ open class ApiDetector : Detector(), UastScanner {
|
||||
if (methodSdkLevel != -1 && methodSdkLevel > buildSdk) {
|
||||
val message = "This method is not overriding anything with the current build " +
|
||||
"target, but will in API level $methodSdkLevel (current target is $buildSdk): `${node.name}`"
|
||||
context.report(OVERRIDE, node, context.getLocation(node.nameElement), message);
|
||||
context.report(OVERRIDE, node, context.getLocation(node.nameElement), message)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -225,17 +225,17 @@ open class ApiDetector : Detector(), UastScanner {
|
||||
val value = (valueNode as ULiteralExpression).value as String
|
||||
return SdkVersionInfo.getApiByBuildCode(value, true)
|
||||
} else if (valueNode is UQualifiedExpression) {
|
||||
val codename = valueNode.getSelectorAsIdentifier() ?: return -1;
|
||||
val codename = valueNode.getSelectorAsIdentifier() ?: return -1
|
||||
return SdkVersionInfo.getApiByBuildCode(codename, true)
|
||||
} else if (valueNode is USimpleReferenceExpression) {
|
||||
val codename = valueNode.identifier;
|
||||
val codename = valueNode.identifier
|
||||
return SdkVersionInfo.getApiByBuildCode(codename, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
return -1
|
||||
}
|
||||
|
||||
fun isCheckedExplicitly(context: UastAndroidContext, requiredVersion: Int, node: UElement): Boolean {
|
||||
|
||||
+2
-2
@@ -86,7 +86,7 @@ abstract class AbstractAndroidBoxTest : AbstractBlackBoxCodegenTest() {
|
||||
return true
|
||||
}
|
||||
})
|
||||
Collections.sort(files);
|
||||
Collections.sort(files)
|
||||
if (additionalFiles != null) {
|
||||
files.addAll(additionalFiles)
|
||||
}
|
||||
@@ -95,6 +95,6 @@ abstract class AbstractAndroidBoxTest : AbstractBlackBoxCodegenTest() {
|
||||
ArrayUtil.toStringArray(files),
|
||||
KotlinTestUtils.getHomeDirectory() + "/plugins/android-extensions/android-extensions-compiler/testData"
|
||||
)
|
||||
blackBox();
|
||||
blackBox()
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ private val MODIFIER_MAP = mapOf(
|
||||
|
||||
internal fun PsiModifierListOwner.hasModifier(modifier: UastModifier): Boolean {
|
||||
if (modifier == UastModifier.JVM_FIELD && this is PsiField) {
|
||||
return true;
|
||||
return true
|
||||
}
|
||||
if (modifier == UastModifier.OVERRIDE && this is PsiAnnotationOwner) {
|
||||
return this.annotations.any { it.qualifiedName == "java.lang.Override" }
|
||||
@@ -40,7 +40,7 @@ internal fun PsiModifierListOwner.hasModifier(modifier: UastModifier): Boolean {
|
||||
return this.hasModifierProperty(PsiModifier.FINAL)
|
||||
}
|
||||
if (modifier == UastModifier.FINAL && this is PsiVariable) {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
val javaModifier = MODIFIER_MAP[modifier] ?: return false
|
||||
return hasModifierProperty(javaModifier)
|
||||
|
||||
@@ -53,7 +53,7 @@ open class AbstractStructureTest : LightCodeInsightTestCase() {
|
||||
file.writeText(text)
|
||||
throw NoTestFileException(file)
|
||||
} else {
|
||||
val lineSeparator = System.getProperty("line.separator") ?: "\n";
|
||||
val lineSeparator = System.getProperty("line.separator") ?: "\n"
|
||||
val expected = file.readLines().map { it.trimEnd() }.joinToString(lineSeparator).trim()
|
||||
val actual = text.lines().map { it.trimEnd() }.joinToString(lineSeparator).trim()
|
||||
assertEquals(expected, actual)
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.uast;
|
||||
package org.jetbrains.kotlin.uast
|
||||
|
||||
import org.jetbrains.kotlin.psi.KtStringTemplateExpression
|
||||
import org.jetbrains.uast.UBinaryExpression
|
||||
|
||||
@@ -63,7 +63,7 @@ abstract class AbstractKotlinLintTest : KotlinAndroidTestCase() {
|
||||
}
|
||||
}
|
||||
|
||||
val virtualFile = myFixture.copyFileToProject(ktFile.absolutePath, "src/" + getTestName(true) + ".kt");
|
||||
val virtualFile = myFixture.copyFileToProject(ktFile.absolutePath, "src/" + getTestName(true) + ".kt")
|
||||
myFixture.configureFromExistingVirtualFile(virtualFile)
|
||||
|
||||
myFixture.doHighlighting()
|
||||
|
||||
Reference in New Issue
Block a user