File tree Expand file tree Collapse file tree 4 files changed +4
-35
lines changed
src/main/kotlin/com/xenomachina/argparser Expand file tree Collapse file tree 4 files changed +4
-35
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ buildscript {
3030plugins {
3131 id " com.jfrog.bintray" version " 1.8.0"
3232 id ' net.researchgate.release' version " 2.6.0"
33+ id ' org.jmailen.kotlinter' version ' 1.7.0'
3334}
3435
3536apply plugin : ' maven'
@@ -68,35 +69,6 @@ sourceSets {
6869 main. java. srcDirs + = ' src/main/kotlin'
6970}
7071
71- // ////////////////////////////////////////////////////////////////////////////
72- // ktlint config
73- // ////////////////////////////////////////////////////////////////////////////
74-
75- // Based on https://github.com/shyiko/ktlint
76-
77- configurations {
78- ktlint
79- }
80-
81- dependencies {
82- ktlint " com.github.shyiko:ktlint:$ktlint_version "
83- }
84-
85- task ktlint (type : JavaExec ) {
86- main = " com.github.shyiko.ktlint.Main"
87- classpath = configurations. ktlint
88- args " src/**/*.kt"
89- }
90-
91- check. dependsOn ktlint
92-
93- task ktlintFormat (type : JavaExec ) {
94- main = " com.github.shyiko.ktlint.Main"
95- classpath = configurations. ktlint
96- args " -F" , " src/**/*.kt"
97- }
98-
99-
10072// ////////////////////////////////////////////////////////////////////////////
10173// Dokka config
10274// ////////////////////////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change @@ -4,5 +4,4 @@ version=2.0.5-SNAPSHOT
44dokka_version = 0.9.15
55kotlintest_version = 2.0.7
66kotlin_version = 1.2.20
7- ktlint_version = 0.14.0
87xenocom_version = 0.0.5
Original file line number Diff line number Diff line change @@ -386,10 +386,8 @@ class ArgParser(args: Array<out String>,
386386 ) {
387387 operator fun provideDelegate (thisRef : Any? , prop : KProperty <* >): Delegate <T > {
388388 val delegate = ctor(prop.name)
389- return (if (default == null )
390- delegate
391- else
392- delegate.default(default)).provideDelegate(thisRef, prop)
389+ return (if (default == null ) delegate
390+ else delegate.default(default)).provideDelegate(thisRef, prop)
393391 }
394392 }
395393
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ fun <T> ArgParser.Delegate<T>.default(defaultValue: () -> T): ArgParser.Delegate
8484 get() = inner.help
8585
8686 override fun addValidator (validator : ArgParser .Delegate <T >.() -> Unit ): ArgParser .Delegate <T > =
87- apply { inner.addValidator { validator(this @apply) } }
87+ apply { inner.addValidator { validator(this @apply) } }
8888
8989 override fun registerLeaf (root : ArgParser .Delegate <* >) {
9090 inner.registerLeaf(root)
You can’t perform that action at this time.
0 commit comments