Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Nek-12 committed Dec 8, 2024
1 parent cb449be commit bb80453
Show file tree
Hide file tree
Showing 23 changed files with 17 additions and 27 deletions.
3 changes: 1 addition & 2 deletions benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import configureMultiplatform

import kotlinx.benchmark.gradle.JvmBenchmarkTarget
import kotlinx.benchmark.gradle.benchmark

Expand Down Expand Up @@ -26,7 +26,6 @@ kotlin {
windows = false,
wasmJs = false,
)

}
tasks.withType<JavaExec>().configureEach {
jvmArgs("-Dkotlinx.coroutines.debug=off")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import pro.respawn.flowmvi.benchmarks.setup.BenchmarkIntent
import pro.respawn.flowmvi.benchmarks.setup.BenchmarkState

@OptIn(ExperimentalFluxoApi::class)
internal inline fun fluxoStore(
) = store(BenchmarkState(), reducer = { it: BenchmarkIntent ->
internal inline fun fluxoStore() = store(BenchmarkState(), reducer = { it: BenchmarkIntent ->
when (it) {
BenchmarkIntent.Increment -> copy(counter = counter + 1)
}
Expand Down
2 changes: 0 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ versionCatalogUpdate {
}
}



tasks {
withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
buildUponDefaultConfig = true
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/ConfigureMultiplatform.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fun Project.configureMultiplatform(
configure: KotlinHierarchyBuilder.Root.() -> Unit = {},
) = ext.apply {
val libs by versionCatalog
if(explicitApi) explicitApi()
if (explicitApi) explicitApi()
applyDefaultHierarchyTemplate(configure)
withSourcesJar(true)
compilerOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ public interface Store<out S : MVIState, in I : MVIIntent, out A : MVIAction> :

// override with a mutable return type
override fun start(scope: CoroutineScope): StoreLifecycle

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package pro.respawn.flowmvi.debugger.model

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.UseSerializers
import pro.respawn.flowmvi.api.MVIAction
import pro.respawn.flowmvi.api.MVIIntent
import pro.respawn.flowmvi.api.MVIState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

package pro.respawn.flowmvi.debugger.model

import kotlin.uuid.Uuid
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import pro.respawn.flowmvi.api.MVIAction
import kotlin.uuid.Uuid

@Serializable
@SerialName("ServerEvent")
Expand Down
2 changes: 2 additions & 0 deletions debugger/ideplugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ intellijPlatform {
}
publishing {
token = props["plugin.publishing.token"]?.toString()
hidden = true
}
pluginConfiguration {
ideaVersion {
Expand All @@ -49,6 +50,7 @@ intellijPlatform {
description = Config.Plugin.description
name = Config.Plugin.name
version = Config.versionName
changeNotes = System.getenv("CHANGELOG")
}
}

Expand Down
2 changes: 0 additions & 2 deletions debugger/server/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi

plugins {
id(libs.plugins.kotlin.multiplatform.id)
alias(libs.plugins.compose)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package pro.respawn.flowmvi.debugger.server

import androidx.compose.runtime.Immutable
import kotlin.uuid.Uuid
import kotlinx.collections.immutable.PersistentList
import kotlinx.collections.immutable.PersistentMap
import kotlinx.collections.immutable.persistentListOf
Expand All @@ -13,6 +12,7 @@ import pro.respawn.flowmvi.api.MVIIntent
import pro.respawn.flowmvi.api.MVIState
import pro.respawn.flowmvi.debugger.model.ClientEvent
import pro.respawn.flowmvi.debugger.model.ServerEvent
import kotlin.uuid.Uuid

internal enum class StoreCommand {
Stop, ResendIntent, RollbackState, ResendAction, RethrowException, SetInitialState
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package pro.respawn.flowmvi.debugger.server

import kotlin.uuid.Uuid
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.toPersistentList
import kotlinx.coroutines.Dispatchers
Expand All @@ -26,6 +25,7 @@ import pro.respawn.flowmvi.dsl.updateStateImmediate
import pro.respawn.flowmvi.plugins.enableLogging
import pro.respawn.flowmvi.plugins.recover
import pro.respawn.flowmvi.plugins.reduce
import kotlin.uuid.Uuid
import pro.respawn.flowmvi.debugger.server.ServerAction as Action
import pro.respawn.flowmvi.debugger.server.ServerIntent as Intent
import pro.respawn.flowmvi.debugger.server.ServerState as State
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package pro.respawn.flowmvi.debugger.server.navigation

import kotlin.uuid.Uuid
import pro.respawn.flowmvi.debugger.server.navigation.util.Navigator
import kotlin.uuid.Uuid

interface AppNavigator : Navigator {
fun connect()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import androidx.compose.runtime.State
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import kotlin.uuid.Uuid
import pro.respawn.flowmvi.debugger.server.navigation.component.RootComponent
import pro.respawn.flowmvi.debugger.server.navigation.component.StackComponent
import pro.respawn.flowmvi.debugger.server.navigation.destination.Destination
import pro.respawn.flowmvi.debugger.server.navigation.details.DetailsComponent
import kotlin.uuid.Uuid

@Composable
fun rememberAppNavigator(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
package pro.respawn.flowmvi.debugger.server.navigation.destination

import androidx.compose.runtime.Immutable
import kotlin.uuid.Uuid
import kotlinx.serialization.Serializable
import kotlinx.serialization.UseSerializers
import kotlin.uuid.Uuid

@Serializable
@Immutable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package pro.respawn.flowmvi.debugger.server.ui.screens.storedetails

import kotlin.uuid.Uuid
import kotlinx.collections.immutable.toPersistentList
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.onEach
Expand All @@ -27,6 +26,7 @@ import pro.respawn.flowmvi.plugins.recover
import pro.respawn.flowmvi.plugins.reduce
import pro.respawn.flowmvi.plugins.whileSubscribed
import pro.respawn.flowmvi.util.typed
import kotlin.uuid.Uuid

private typealias Ctx = PipelineContext<StoreDetailsState, StoreDetailsIntent, StoreDetailsAction>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package pro.respawn.flowmvi.debugger.server.ui.screens.storedetails

import androidx.compose.runtime.Immutable
import kotlin.uuid.Uuid
import kotlinx.collections.immutable.ImmutableList
import pro.respawn.flowmvi.api.MVIAction
import pro.respawn.flowmvi.api.MVIIntent
import pro.respawn.flowmvi.api.MVIState
import pro.respawn.flowmvi.debugger.server.ServerEventEntry
import pro.respawn.flowmvi.debugger.server.StoreCommand
import pro.respawn.flowmvi.debugger.server.ui.screens.timeline.FocusedEvent
import kotlin.uuid.Uuid

@Immutable
internal sealed interface StoreDetailsState : MVIState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import androidx.compose.ui.platform.LocalClipboardManager
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.unit.dp
import kotlin.uuid.Uuid
import kotlinx.collections.immutable.toImmutableList
import org.koin.core.parameter.parametersOf
import pro.respawn.flowmvi.api.IntentReceiver
Expand All @@ -49,6 +48,7 @@ import pro.respawn.flowmvi.debugger.server.ui.widgets.TypeCrossfade
import pro.respawn.flowmvi.util.typed
import pro.respawn.kmmutils.common.copies
import pro.respawn.kmmutils.compose.annotate
import kotlin.uuid.Uuid

@OptIn(ExperimentalMaterial3Api::class)
@Composable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package pro.respawn.flowmvi.debugger.server.ui.screens.timeline

import androidx.compose.runtime.Immutable
import kotlin.uuid.Uuid
import kotlinx.collections.immutable.ImmutableList
import kotlinx.datetime.LocalDateTime
import kotlinx.datetime.TimeZone
Expand All @@ -12,6 +11,7 @@ import pro.respawn.flowmvi.api.MVIState
import pro.respawn.flowmvi.debugger.model.ClientEvent
import pro.respawn.flowmvi.debugger.server.ServerEventEntry
import pro.respawn.flowmvi.debugger.server.util.type
import kotlin.uuid.Uuid

internal enum class EventType {
Intent, Action, StateChange, Subscription, Connection, Exception, Initialization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ internal class P2QuantileEstimator(private vararg val probabilities: Double) : S
val qI = q[i]

val numerator = (nI - nMinus1 + d) * (qPlus1 - qI) / (nPlus1 - nI) +
(nPlus1 - nI - d) * (qI - qMinus1) / (nI - nMinus1)
(nPlus1 - nI - d) * (qI - qMinus1) / (nI - nMinus1)

return qI + d / (nPlus1 - nMinus1) * numerator
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package pro.respawn.flowmvi.sample.navigation.destination

import androidx.compose.runtime.Immutable
import kotlinx.serialization.Serializable
import kotlinx.serialization.UseSerializers
import pro.respawn.kmmutils.common.fastLazy

@Serializable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import pro.respawn.flowmvi.api.MVIState
import pro.respawn.flowmvi.api.StorePlugin
import pro.respawn.flowmvi.dsl.StoreBuilder
import pro.respawn.flowmvi.dsl.lazyPlugin
import pro.respawn.flowmvi.dsl.state
import pro.respawn.flowmvi.savedstate.api.SaveBehavior
import pro.respawn.flowmvi.savedstate.api.SaveBehavior.OnChange
import pro.respawn.flowmvi.savedstate.api.SaveBehavior.OnUnsubscribe
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencyResolutionManagement {
// mavenLocal()
google()
mavenCentral()
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}

versionCatalogs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

package pro.respawn.flowmvi.test.plugin

import kotlinx.atomicfu.atomic
import kotlinx.coroutines.Job
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
Expand Down

0 comments on commit bb80453

Please sign in to comment.