From bb033c3ed35f099e17f181e0556ae38d574b0735 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 17 Jan 2024 23:26:53 +0000 Subject: [PATCH 1/2] chore(deps): update dependency com.facebook:ktfmt to v0.47 --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index f2d6a65..b6dc51c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -45,7 +45,7 @@ publishing { } spotless { - val ktfmtVersion = "0.46" + val ktfmtVersion = "0.47" kotlin { ktfmt(ktfmtVersion).googleStyle() target("**/*.kt") From 459bc3f3cbfc3fa1614d6f247e5f6b7463aed747 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Thu, 18 Jan 2024 12:47:16 +0530 Subject: [PATCH 2/2] chore: reformat with ktfmt 0.47 --- sample/src/commonMain/kotlin/main.kt | 11 ++--------- .../github/androidpasswordstore/sublimefuzzy/Fuzzy.kt | 6 +++--- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/sample/src/commonMain/kotlin/main.kt b/sample/src/commonMain/kotlin/main.kt index 3231d5d..64225e7 100644 --- a/sample/src/commonMain/kotlin/main.kt +++ b/sample/src/commonMain/kotlin/main.kt @@ -1,16 +1,9 @@ import com.github.androidpasswordstore.sublimefuzzy.Fuzzy fun main() { - val simpleMatchData = - mapOf( - ("test" to "tests") to true, - ("test" to "tset") to false, - ) + val simpleMatchData = mapOf(("test" to "tests") to true, ("test" to "tset") to false) val matchData = - mapOf( - ("fot" to "FbxImporter.h") to (true to 105), - ("fot" to "kot") to (false to 0), - ) + mapOf(("fot" to "FbxImporter.h") to (true to 105), ("fot" to "kot") to (false to 0)) simpleMatchData.forEach { (match, expected) -> val result = Fuzzy.fuzzyMatchSimple(match.first, match.second) require(result == expected) { diff --git a/src/commonMain/kotlin/com/github/androidpasswordstore/sublimefuzzy/Fuzzy.kt b/src/commonMain/kotlin/com/github/androidpasswordstore/sublimefuzzy/Fuzzy.kt index 02438d3..e8c22bb 100644 --- a/src/commonMain/kotlin/com/github/androidpasswordstore/sublimefuzzy/Fuzzy.kt +++ b/src/commonMain/kotlin/com/github/androidpasswordstore/sublimefuzzy/Fuzzy.kt @@ -38,7 +38,7 @@ public object Fuzzy { maxMatches: Int, nextMatchOut: Int, recursionCountOut: Int, - recursionLimit: Int + recursionLimit: Int, ): Pair { var outScore = 0 var strCurIndex = strCurIndexOut @@ -88,7 +88,7 @@ public object Fuzzy { maxMatches, nextMatch, recursionCount, - recursionLimit + recursionLimit, ) if (matched) { @@ -194,7 +194,7 @@ public object Fuzzy { maxMatches, 0, recursionCount, - recursionLimit + recursionLimit, ) } }