File tree Expand file tree Collapse file tree 11 files changed +35
-44
lines changed
generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter Expand file tree Collapse file tree 11 files changed +35
-44
lines changed Original file line number Diff line number Diff line change 1
1
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2
+ import org.jetbrains.kotlin.tooling.core.closure
2
3
import org.jetbrains.kotlinx.publisher.apache2
3
4
import org.jetbrains.kotlinx.publisher.developer
4
5
import org.jetbrains.kotlinx.publisher.githubRepo
6
+ import org.jmailen.gradle.kotlinter.KotlinterExtension
5
7
6
8
@Suppress(" DSL_SCOPE_VIOLATION" , " UnstableApiUsage" )
7
9
plugins {
@@ -51,6 +53,31 @@ allprojects {
51
53
sourceCompatibility = JavaVersion .VERSION_1_8 .toString()
52
54
targetCompatibility = JavaVersion .VERSION_1_8 .toString()
53
55
}
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
+ }
54
81
}
55
82
56
83
koverMerged {
Original file line number Diff line number Diff line change @@ -298,24 +298,6 @@ korro {
298
298
}
299
299
}
300
300
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
-
319
301
tasks.withType<KspTaskJvm > {
320
302
dependsOn(tasks.generateKeywordsSrc)
321
303
}
Original file line number Diff line number Diff line change @@ -50,9 +50,9 @@ internal inline fun <reified T : Any> JupyterHtmlRenderer.render(
50
50
includeCss = true ,
51
51
).plus(
52
52
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 ),
54
55
cellRenderer = contextRenderer,
55
- includeStatic = false , // is added later to make sure it's put outside of potential iFrames
56
56
) { footer }
57
57
).toJupyterHtmlData()
58
58
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ plugins {
2
2
kotlin(" jvm" )
3
3
kotlin(" libs.publisher" )
4
4
id(" org.jetbrains.kotlinx.kover" )
5
+ id(" org.jmailen.kotlinter" )
5
6
}
6
7
7
8
group = " org.jetbrains.kotlinx"
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ plugins {
2
2
kotlin(" jvm" )
3
3
kotlin(" libs.publisher" )
4
4
id(" org.jetbrains.kotlinx.kover" )
5
+ id(" org.jmailen.kotlinter" )
5
6
}
6
7
7
8
group = " org.jetbrains.kotlinx"
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ plugins {
3
3
kotlin(" libs.publisher" )
4
4
id(" org.jetbrains.kotlinx.kover" )
5
5
kotlin(" jupyter.api" )
6
+ // TODO enable later: id("org.jmailen.kotlinter")
6
7
}
7
8
8
9
group = " org.jetbrains.kotlinx"
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ plugins {
3
3
kotlin(" libs.publisher" )
4
4
kotlin(" plugin.serialization" )
5
5
id(" org.jetbrains.kotlinx.kover" )
6
-
6
+ id( " org.jmailen.kotlinter " )
7
7
kotlin(" jupyter.api" )
8
8
}
9
9
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ plugins {
5
5
`java- gradle- plugin`
6
6
`maven- publish`
7
7
id(" com.gradle.plugin-publish" ) version " 0.15.0"
8
+ id(" org.jmailen.kotlinter" )
8
9
}
9
10
10
11
repositories {
Original file line number Diff line number Diff line change @@ -47,14 +47,6 @@ tasks.test {
47
47
}
48
48
}
49
49
50
- kotlinter {
51
- ignoreFailures = false
52
- reporters = arrayOf(" checkstyle" , " plain" )
53
- disabledRules = arrayOf(
54
- " max-line-length" ,
55
- )
56
- }
57
-
58
50
sourceSets {
59
51
main {
60
52
java.setSrcDirs(listOf (" src" ))
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ plugins {
2
2
id(" com.github.johnrengelman.shadow" ) version " 7.1.2"
3
3
id(" org.jetbrains.kotlin.jvm" )
4
4
id(" org.jetbrains.kotlin.libs.publisher" )
5
+ id(" org.jmailen.kotlinter" )
5
6
}
6
7
7
8
repositories {
You can’t perform that action at this time.
0 commit comments