Skip to content

Commit

Permalink
changing formatter settings to IDEA, and formatting accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
robertfmurdock committed Oct 14, 2023
1 parent 035a05f commit 5239637
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*.{kt,kts}]
ktlint_code_style = intellij_idea
ktlint_standard_function-naming = disabled
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ fun Grgit.currentContributionCommits(): List<Commit> {
return if (tag == null) {
log()
} else {
return log(fun(it: LogOp) { it.range(tag, "HEAD") })
return log(fun(it: LogOp) {
it.range(tag, "HEAD")
})
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.zegreatrob.tools.digger.core

enum class SemverType {
None, Patch, Minor, Major
None,
Patch,
Minor,
Major,
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
})
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 5239637

Please sign in to comment.