[#693] Ktlint 0.48.0

* Bump version 0.48.0

* Move config file to /tools

+ global suppress

* Local suppress of no-semi

* Minor indentation fix
This commit is contained in:
Honza Rychnovsky 2022-12-19 18:58:43 +01:00 committed by GitHub
parent 00dc366fc3
commit a8308bd492
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 16 deletions

View File

@ -13,7 +13,7 @@ dependencies {
} }
tasks { tasks {
val editorConfigFile = rootProject.file(".editorconfig") val editorConfigFile = rootProject.file("tools/.editorconfig")
val ktlintArgs = listOf("**/src/**/*.kt", "!**/build/**.kt", "--editorconfig=$editorConfigFile") val ktlintArgs = listOf("**/src/**/*.kt", "!**/build/**.kt", "--editorconfig=$editorConfigFile")
register("ktlint", org.gradle.api.tasks.JavaExec::class) { register("ktlint", org.gradle.api.tasks.JavaExec::class) {

View File

@ -106,7 +106,7 @@ FLANK_VERSION=21.09.0
FULLADLE_VERSION=0.17.4 FULLADLE_VERSION=0.17.4
GRADLE_VERSIONS_PLUGIN_VERSION=0.42.0 GRADLE_VERSIONS_PLUGIN_VERSION=0.42.0
JGIT_VERSION=6.1.0.202203080745-r JGIT_VERSION=6.1.0.202203080745-r
KTLINT_VERSION=0.47.1 KTLINT_VERSION=0.48.0
PLAY_PUBLISHER_PLUGIN_VERSION=3.7.0 PLAY_PUBLISHER_PLUGIN_VERSION=3.7.0
ACCOMPANIST_PERMISSIONS_VERSION=0.25.1 ACCOMPANIST_PERMISSIONS_VERSION=0.25.1

5
tools/.editorconfig Normal file
View File

@ -0,0 +1,5 @@
# Opt-out from missing-trailing-comma rule enabled by default
root = true
[*.{kt,kts}]
ktlint_standard_trailing-comma-on-call-site = disabled
ktlint_standard_trailing-comma-on-declaration-site = disabled

View File

@ -54,6 +54,9 @@ data class ConfigurationOverride(val uiMode: UiMode?, val locale: LocaleList?) {
} }
} }
// TODO [694]: Ktlint 0.48.1 (remove this suppress)
// TODO [694]: https://github.com/zcash/secant-android-wallet/issues/694
@Suppress("ktlint:no-semi")
enum class UiMode { enum class UiMode {
Light, Dark; Light, Dark;
} }

View File

@ -128,21 +128,21 @@ fun RestoreWallet(
Scaffold(topBar = { Scaffold(topBar = {
RestoreTopAppBar(onBack = onBack, onClear = { userWordList.set(emptyList()) }) RestoreTopAppBar(onBack = onBack, onClear = { userWordList.set(emptyList()) })
}, bottomBar = { }, bottomBar = {
Column(Modifier.verticalScroll(rememberScrollState())) { Column(Modifier.verticalScroll(rememberScrollState())) {
Warn(parseResult) Warn(parseResult)
Autocomplete(parseResult = parseResult) { Autocomplete(parseResult = parseResult) {
textState = "" textState = ""
userWordList.append(listOf(it)) userWordList.append(listOf(it))
focusRequester.requestFocus() focusRequester.requestFocus()
}
NextWordTextField(
modifier = Modifier.focusRequester(focusRequester),
parseResult = parseResult,
text = textState,
setText = { textState = it }
)
} }
}) { paddingValues -> NextWordTextField(
modifier = Modifier.focusRequester(focusRequester),
parseResult = parseResult,
text = textState,
setText = { textState = it }
)
}
}) { paddingValues ->
RestoreMainContent( RestoreMainContent(
paddingValues = paddingValues, paddingValues = paddingValues,
userWordList = userWordList, userWordList = userWordList,

View File

@ -10,6 +10,9 @@ interface AppUpdateChecker {
val stalenessDays: Int val stalenessDays: Int
// TODO [694]: Ktlint 0.48.1 (remove this suppress)
// TODO [694]: https://github.com/zcash/secant-android-wallet/issues/694
@Suppress("ktlint:no-semi")
enum class Priority { enum class Priority {
LOW { LOW {
override fun priorityUpperBorder() = 1 override fun priorityUpperBorder() = 1