Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency com.pinterest.ktlint:ktlint-cli to v1.3.1 #643

Merged
merged 2 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ij_kotlin_allow_trailing_comma=true
ij_kotlin_allow_trailing_comma_on_call_site=true
indent_size=4
ktlint_code_style=android_studio
ktlint_standard_class-signature = disabled
ktlint_standard_spacing-between-declarations-with-annotations=disabled
ktlint_standard_trailing-comma-on-call-site=disabled
ktlint_standard_trailing-comma-on-declaration-site=disabled
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ kotlin = "1.9.24"
kotlinCoroutines = "1.8.1"
kustomExport = "0.8.2"
goncalossilvaResources = "0.4.1"
ktlint = "1.2.1"
ktlint = "1.3.1"
napier = "2.6.1"
npmPublish = "3.4.2"
okio = "3.9.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import kotlin.js.JsExport
import kotlin.js.JsName
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.withContext
import org.ccci.gto.support.androidx.annotation.RestrictTo
import org.ccci.gto.support.androidx.annotation.RestrictToScope
import org.cru.godtools.shared.tool.parser.internal.FileNotFoundException
import org.cru.godtools.shared.tool.parser.model.Manifest
import org.cru.godtools.shared.tool.parser.xml.XmlPullParserException
Expand Down Expand Up @@ -43,9 +41,7 @@ sealed class ParserResult {
class Data(val manifest: Manifest) : ParserResult()

@JsName("ParserError")
open class Error
@RestrictTo(RestrictToScope.LIBRARY_GROUP)
constructor(val error: Throwable? = null) : ParserResult() {
open class Error internal constructor(val error: Throwable? = null) : ParserResult() {
class Corrupted internal constructor(e: Exception? = null) : Error(e)
class NotFound internal constructor(e: Exception? = null) : Error(e)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@
@OptIn(ExperimentalJsExport::class)
sealed class Dimension {
internal companion object {
fun String?.toDimensionOrNull(): Dimension? {
return when (val trimmed = this?.trim()) {
null -> null
in REGEX_PERCENT -> trimmed.trimEnd('%').toFloatOrNull()?.let { Percent(it / 100) }
in REGEX_PIXELS -> trimmed.toIntOrNull()?.let { Pixels(it) }
else -> null
}
fun String?.toDimensionOrNull() = when (val trimmed = this?.trim()) {
null -> null
in REGEX_PERCENT -> trimmed.trimEnd('%').toFloatOrNull()?.let { Percent(it / 100) }
Dismissed Show dismissed Hide dismissed
in REGEX_PIXELS -> trimmed.toIntOrNull()?.let { Pixels(it) }
else -> null
}
}

Expand Down
Loading