diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..df89db8 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,3 @@ +[*.{kt,kts}] +ktlint_code_style = intellij_idea +ktlint_standard_function-naming = disabled \ No newline at end of file diff --git a/tools/digger-core/src/main/kotlin/com/zegreatrob/tools/digger/core/CurrentContributionCommits.kt b/tools/digger-core/src/main/kotlin/com/zegreatrob/tools/digger/core/CurrentContributionCommits.kt index 4f02fbc..6d65b38 100644 --- a/tools/digger-core/src/main/kotlin/com/zegreatrob/tools/digger/core/CurrentContributionCommits.kt +++ b/tools/digger-core/src/main/kotlin/com/zegreatrob/tools/digger/core/CurrentContributionCommits.kt @@ -10,7 +10,9 @@ fun Grgit.currentContributionCommits(): List { return if (tag == null) { log() } else { - return log(fun(it: LogOp) { it.range(tag, "HEAD") }) + return log(fun(it: LogOp) { + it.range(tag, "HEAD") + }) } } diff --git a/tools/digger-core/src/main/kotlin/com/zegreatrob/tools/digger/core/SemverType.kt b/tools/digger-core/src/main/kotlin/com/zegreatrob/tools/digger/core/SemverType.kt index 7e56c12..10725c1 100644 --- a/tools/digger-core/src/main/kotlin/com/zegreatrob/tools/digger/core/SemverType.kt +++ b/tools/digger-core/src/main/kotlin/com/zegreatrob/tools/digger/core/SemverType.kt @@ -1,5 +1,8 @@ package com.zegreatrob.tools.digger.core enum class SemverType { - None, Patch, Minor, Major + None, + Patch, + Minor, + Major, } diff --git a/tools/tagger-plugin/src/functionalTest/kotlin/tagger/TaggerPluginFunctionalTest.kt b/tools/tagger-plugin/src/functionalTest/kotlin/tagger/TaggerPluginFunctionalTest.kt index 367582e..c288a85 100644 --- a/tools/tagger-plugin/src/functionalTest/kotlin/tagger/TaggerPluginFunctionalTest.kt +++ b/tools/tagger-plugin/src/functionalTest/kotlin/tagger/TaggerPluginFunctionalTest.kt @@ -75,7 +75,9 @@ class TaggerPluginFunctionalTest { grgit.add(fun(it: AddOp) { it.patterns = setOf(".") }) - grgit.commit(fun(it: CommitOp) { it.message = "test commit" }) + grgit.commit(fun(it: CommitOp) { + it.message = "test commit" + }) grgit.tag.add(fun(it: TagAddOp) { it.name = "1.0.23" }) @@ -524,7 +526,9 @@ class TaggerPluginFunctionalTest { patterns = setOf(settingsFile.name, buildFile.name, ignoreFile.name) }) - grgit.commit(fun CommitOp.() { message = "test commit" }) + grgit.commit(fun CommitOp.() { + message = "test commit" + }) if (initialTag != null) { grgit.tag.add(fun(it: TagAddOp) { it.name = initialTag diff --git a/tools/tagger-plugin/src/main/kotlin/com/zegreatrob/tools/tagger/CalculateVersion.kt b/tools/tagger-plugin/src/main/kotlin/com/zegreatrob/tools/tagger/CalculateVersion.kt index b5abf5b..a3cf3cc 100644 --- a/tools/tagger-plugin/src/main/kotlin/com/zegreatrob/tools/tagger/CalculateVersion.kt +++ b/tools/tagger-plugin/src/main/kotlin/com/zegreatrob/tools/tagger/CalculateVersion.kt @@ -55,7 +55,9 @@ private fun Grgit.findAppropriateIncrement( implicitPatch: Boolean, minorRegex: VersionRegex, ): ChangeType? = - log(fun(it: LogOp) { it.range(previousVersionNumber, "HEAD") }) + log(fun(it: LogOp) { + it.range(previousVersionNumber, "HEAD") + }) .also { if (it.isEmpty()) return null } .map { it.changeType(minorRegex) ?: if (implicitPatch) ChangeType.Patch else null } .fold(null, ::highestPriority) @@ -111,7 +113,9 @@ fun Grgit.canRelease(releaseBranch: String): Boolean { val currentBranch = branch.current() val currentBranchStatus: BranchStatus? = runCatching { - branch.status(fun(it: BranchStatusOp) { it.name = currentBranch.name }) + branch.status(fun(it: BranchStatusOp) { + it.name = currentBranch.name + }) } .getOrNull() return if (currentBranchStatus == null) { diff --git a/tools/tagger-plugin/src/main/kotlin/com/zegreatrob/tools/tagger/TagVersion.kt b/tools/tagger-plugin/src/main/kotlin/com/zegreatrob/tools/tagger/TagVersion.kt index 64ccd5b..adb3295 100644 --- a/tools/tagger-plugin/src/main/kotlin/com/zegreatrob/tools/tagger/TagVersion.kt +++ b/tools/tagger-plugin/src/main/kotlin/com/zegreatrob/tools/tagger/TagVersion.kt @@ -42,8 +42,12 @@ open class TagVersion : DefaultTask(), TaggerExtensionSyntax { headHasNoTag() && isOnReleaseBranch(grgit, releaseBranch) ) { - this.grgit.tag.add(fun (it: TagAddOp) { it.name = version }) - this.grgit.push(fun (it: PushOp) { it.tags = true }) + this.grgit.tag.add(fun (it: TagAddOp) { + it.name = version + }) + this.grgit.push(fun (it: PushOp) { + it.tags = true + }) } else { logger.warn("skipping tag") }