Skip to content

Commit e2a131b

Browse files
committed
Enabling linter for all modules except jdbc
1 parent b3f3331 commit e2a131b

File tree

11 files changed

+35
-44
lines changed

11 files changed

+35
-44
lines changed

build.gradle.kts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
import org.jetbrains.kotlin.tooling.core.closure
23
import org.jetbrains.kotlinx.publisher.apache2
34
import org.jetbrains.kotlinx.publisher.developer
45
import org.jetbrains.kotlinx.publisher.githubRepo
6+
import org.jmailen.gradle.kotlinter.KotlinterExtension
57

68
@Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
79
plugins {
@@ -51,6 +53,31 @@ allprojects {
5153
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
5254
targetCompatibility = JavaVersion.VERSION_1_8.toString()
5355
}
56+
57+
// Attempts to configure kotlinter for each sub-project that uses the plugin
58+
afterEvaluate {
59+
try {
60+
kotlinter {
61+
ignoreFailures = false
62+
reporters = arrayOf("checkstyle", "plain")
63+
experimentalRules = true
64+
disabledRules = arrayOf(
65+
"no-wildcard-imports",
66+
"experimental:spacing-between-declarations-with-annotations",
67+
"experimental:enum-entry-name-case",
68+
"experimental:argument-list-wrapping",
69+
"experimental:annotation",
70+
"max-line-length",
71+
"filename",
72+
"comment-spacing",
73+
"curly-spacing",
74+
"experimental:annotation-spacing"
75+
)
76+
}
77+
} catch (_: UnknownDomainObjectException) {
78+
logger.warn("Could not set kotlinter config on :${this.name}")
79+
}
80+
}
5481
}
5582

5683
koverMerged {

core/build.gradle.kts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -298,24 +298,6 @@ korro {
298298
}
299299
}
300300

301-
kotlinter {
302-
ignoreFailures = false
303-
reporters = arrayOf("checkstyle", "plain")
304-
experimentalRules = true
305-
disabledRules = arrayOf(
306-
"no-wildcard-imports",
307-
"experimental:spacing-between-declarations-with-annotations",
308-
"experimental:enum-entry-name-case",
309-
"experimental:argument-list-wrapping",
310-
"experimental:annotation",
311-
"max-line-length",
312-
"filename",
313-
"comment-spacing",
314-
"curly-spacing",
315-
"experimental:annotation-spacing"
316-
)
317-
}
318-
319301
tasks.withType<KspTaskJvm> {
320302
dependsOn(tasks.generateKeywordsSrc)
321303
}

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/JupyterHtmlRenderer.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ internal inline fun <reified T : Any> JupyterHtmlRenderer.render(
5050
includeCss = true,
5151
).plus(
5252
df.toHTML(
53-
configuration = reifiedDisplayConfiguration,
53+
// is added later to make sure it's put outside of potential iFrames
54+
configuration = reifiedDisplayConfiguration.copy(enableFallbackStaticTables = false),
5455
cellRenderer = contextRenderer,
55-
includeStatic = false, // is added later to make sure it's put outside of potential iFrames
5656
) { footer }
5757
).toJupyterHtmlData()
5858

dataframe-arrow/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
kotlin("jvm")
33
kotlin("libs.publisher")
44
id("org.jetbrains.kotlinx.kover")
5+
id("org.jmailen.kotlinter")
56
}
67

78
group = "org.jetbrains.kotlinx"

dataframe-excel/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
kotlin("jvm")
33
kotlin("libs.publisher")
44
id("org.jetbrains.kotlinx.kover")
5+
id("org.jmailen.kotlinter")
56
}
67

78
group = "org.jetbrains.kotlinx"

dataframe-jdbc/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ plugins {
33
kotlin("libs.publisher")
44
id("org.jetbrains.kotlinx.kover")
55
kotlin("jupyter.api")
6+
// TODO enable later: id("org.jmailen.kotlinter")
67
}
78

89
group = "org.jetbrains.kotlinx"

dataframe-openapi/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
kotlin("libs.publisher")
44
kotlin("plugin.serialization")
55
id("org.jetbrains.kotlinx.kover")
6-
6+
id("org.jmailen.kotlinter")
77
kotlin("jupyter.api")
88
}
99

plugins/dataframe-gradle-plugin/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ plugins {
55
`java-gradle-plugin`
66
`maven-publish`
77
id("com.gradle.plugin-publish") version "0.15.0"
8+
id("org.jmailen.kotlinter")
89
}
910

1011
repositories {

plugins/expressions-converter/build.gradle.kts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,6 @@ tasks.test {
4747
}
4848
}
4949

50-
kotlinter {
51-
ignoreFailures = false
52-
reporters = arrayOf("checkstyle", "plain")
53-
disabledRules = arrayOf(
54-
"max-line-length",
55-
)
56-
}
57-
5850
sourceSets {
5951
main {
6052
java.setSrcDirs(listOf("src"))

plugins/symbol-processor/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
id("com.github.johnrengelman.shadow") version "7.1.2"
33
id("org.jetbrains.kotlin.jvm")
44
id("org.jetbrains.kotlin.libs.publisher")
5+
id("org.jmailen.kotlinter")
56
}
67

78
repositories {

0 commit comments

Comments
 (0)