Skip to content

Commit

Permalink
bumping ktlint engine version to 1.4.1, disabled new when-entry-braci…
Browse files Browse the repository at this point in the history
…ng rule as it was a bit too aggressive
  • Loading branch information
Jolanrensen committed Nov 13, 2024
1 parent 05e0993 commit ff306f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_e
ktlint_standard_chain-method-continuation = disabled
ktlint_ignore_back_ticked_identifier = true
ktlint_standard_multiline-expression-wrapping = disabled
ktlint_standard_when-entry-bracing = disabled

[{*/build/**/*,**/*keywords*/**,**/*.Generated.kt,**/*$Extensions.kt}]
ktlint = disabled
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ allprojects {
afterEvaluate {
try {
configure<KtlintExtension> {
version = "1.3.0"
version = "1.4.1"
// rules are set up through .editorconfig
}
} catch (_: UnknownDomainObjectException) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import kotlin.reflect.full.withNullability
internal fun <T : Number> Iterable<T>.mean(type: KType, skipNA: Boolean = skipNA_default): Double =
asSequence().mean(type, skipNA)

@Suppress("UNCHECKED_CAST")
internal fun <T : Number> Sequence<T>.mean(type: KType, skipNA: Boolean = skipNA_default): Double {
if (type.isMarkedNullable) {
return filterNotNull().mean(type.withNullability(false), skipNA)
Expand Down

0 comments on commit ff306f9

Please sign in to comment.