From 49fc1b9e3e613a4b44716ac0f8fbb37bf4864e18 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Wed, 17 Feb 2021 23:02:30 +0100 Subject: [PATCH] Build: enable -Werror for several modules --- build.gradle.kts | 5 +---- compiler/cli/build.gradle.kts | 4 +++- .../uast/kotlin/generate/KotlinUastCodeGenerationPlugin.kt | 2 ++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 35cb043c57f..88ef1820899 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -325,11 +325,8 @@ extra["tasksWithWarnings"] = listOf( ":kotlin-stdlib:compileTestKotlin", ":kotlin-stdlib-jdk7:compileTestKotlin", ":kotlin-stdlib-jdk8:compileTestKotlin", - ":compiler:cli:compileKotlin", - ":kotlin-scripting-compiler:compileKotlin", ":plugins:uast-kotlin:compileKotlin", - ":plugins:uast-kotlin:compileTestKotlin", - ":plugins:uast-kotlin-idea:compileKotlin" + ":plugins:uast-kotlin:compileTestKotlin" ) val tasksWithWarnings: List by extra diff --git a/compiler/cli/build.gradle.kts b/compiler/cli/build.gradle.kts index 536c89fc0f9..4b625d46d34 100644 --- a/compiler/cli/build.gradle.kts +++ b/compiler/cli/build.gradle.kts @@ -56,7 +56,9 @@ tasks.withType> { kotlinOptions { languageVersion = "1.3" apiVersion = "1.3" - freeCompilerArgs = freeCompilerArgs - "-progressive" + "-Xskip-prerelease-check" + freeCompilerArgs = freeCompilerArgs - "-progressive" + listOf( + "-Xskip-prerelease-check", "-Xsuppress-version-warnings" + ) } } diff --git a/plugins/uast-kotlin-idea/src/org/jetbrains/uast/kotlin/generate/KotlinUastCodeGenerationPlugin.kt b/plugins/uast-kotlin-idea/src/org/jetbrains/uast/kotlin/generate/KotlinUastCodeGenerationPlugin.kt index 9a3dbe575cb..b4e78d8f8d9 100644 --- a/plugins/uast-kotlin-idea/src/org/jetbrains/uast/kotlin/generate/KotlinUastCodeGenerationPlugin.kt +++ b/plugins/uast-kotlin-idea/src/org/jetbrains/uast/kotlin/generate/KotlinUastCodeGenerationPlugin.kt @@ -91,6 +91,7 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory { return createQualifiedReference(qualifiedName, context?.sourcePsi) } + @Suppress("UNUSED_PARAMETER") /*override*/ fun createQualifiedReference(qualifiedName: String, context: PsiElement?): UQualifiedReferenceExpression? { return psiFactory.createExpression(qualifiedName).let { when (it) { @@ -153,6 +154,7 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory { return psiFactory.createExpression("null").toUElementOfType()!! } + @Suppress("UNUSED_PARAMETER") /*override*/ fun createIntLiteral(value: Int, context: PsiElement?): ULiteralExpression { return psiFactory.createExpression(value.toString()).toUElementOfType()!! }