fluxo-kt/fluxo-mvi

View on GitHub

Showing 2,395 of 2,395 total issues

Method apply has a Cognitive Complexity of 86 (exceeds 20 allowed). Consider refactoring.
Open

override fun apply(target: Project) {
if (!target.isRootProject) {
return
}
 
 
Severity: Minor
Found in gradle/plugins/setup/src/main/kotlin/GradleSetupPlugin.kt - About 1 day to fix

Similar blocks of code found in 2 locations. Consider refactoring.
Open

private fun Project.setupPublicationKotlinJvm(config: PublicationConfig) {
if (!isGenericCompilationEnabled) {
return
}
 
 
Severity: Major
Found in gradle/plugins/setup/src/main/kotlin/SetupPublication.kt and 1 other location - About 3 hrs to fix
gradle/plugins/setup/src/main/kotlin/SetupPublication.kt on lines 182..201

Similar blocks of code found in 2 locations. Consider refactoring.
Open

private fun Project.setupPublicationJava(config: PublicationConfig) {
if (!isGenericCompilationEnabled) {
return
}
 
 
Severity: Major
Found in gradle/plugins/setup/src/main/kotlin/SetupPublication.kt and 1 other location - About 3 hrs to fix
gradle/plugins/setup/src/main/kotlin/SetupPublication.kt on lines 161..180

Method setupPublicationPom has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring.
Open

internal fun MavenPublication.setupPublicationPom(project: Project, config: PublicationConfig) {
// Publish docs with each artifact.
val useDokka = USE_DOKKA && !config.isSnapshot
try {
check(useDokka) { "Dokka disabled" }
Severity: Minor
Found in gradle/plugins/setup/src/main/kotlin/SetupPublication.kt - About 2 hrs to fix

Method apply has 66 lines of code (exceeds 25 allowed). Consider refactoring.
Open

override fun apply(target: Project) {
if (!target.isRootProject) {
return
}
 
 
Severity: Major
Found in gradle/plugins/setup/src/main/kotlin/GradleSetupPlugin.kt - About 2 hrs to fix

    Method setupPublicationMultiplatform has a Cognitive Complexity of 34 (exceeds 20 allowed). Consider refactoring.
    Open

    private fun Project.setupPublicationMultiplatform(config: PublicationConfig) {
    applyMavenPublishPlugin()
     
    group = config.group
    version = config.version
    Severity: Minor
    Found in gradle/plugins/setup/src/main/kotlin/SetupPublication.kt - About 2 hrs to fix

    Method setupPublicationPom has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    internal fun MavenPublication.setupPublicationPom(project: Project, config: PublicationConfig) {
    // Publish docs with each artifact.
    val useDokka = USE_DOKKA && !config.isSnapshot
    try {
    check(useDokka) { "Dokka disabled" }
    Severity: Minor
    Found in gradle/plugins/setup/src/main/kotlin/SetupPublication.kt - About 2 hrs to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      package kt.fluxo.core.annotation
       
      /**
      * The class to which this annotation is applied is not thread-safe. This
      * annotation primarily exists for clarifying the non-thread-safety of a class
      fluxo-core/src/commonMain/kotlin/kt/fluxo/core/annotation/ThreadSafe.common.kt on lines 1..20

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      package kt.fluxo.core.annotation
       
      /**
      * The class to which this annotation is applied is thread-safe. This means that
      * no sequences of accesses (reads and writes to public fields, calls to public
      fluxo-core/src/commonMain/kotlin/kt/fluxo/core/annotation/NotThreadSafe.common.kt on lines 1..19

      Method scmTag has a Cognitive Complexity of 29 (exceeds 20 allowed). Consider refactoring.
      Open

      @Incubating
      @Suppress("ComplexCondition", "MagicNumber")
      fun Project.scmTag(allowBranch: Boolean = true): Provider<String?> {
      val envOrProp = envOrProp("SCM_TAG")
      return provider {
      Severity: Minor
      Found in gradle/plugins/setup/src/main/kotlin/Utils.kt - About 1 hr to fix

      Method setupPublicationAndroidLibrary has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      private fun Project.setupPublicationAndroidLibrary(config: PublicationConfig) {
      if (!isGenericCompilationEnabled) {
      return
      }
       
       
      Severity: Minor
      Found in gradle/plugins/setup/src/main/kotlin/SetupPublication.kt - About 1 hr to fix

        Method setupPublicationRepository has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        internal fun Project.setupPublicationRepository(config: PublicationConfig) {
        val notify = signingKeyNotificationLogged.compareAndSet(false, true)
        if (config.isSigningEnabled) {
        if (notify) logger.lifecycle("> Conf SIGNING_KEY SET, applying signing configuration")
        plugins.apply("signing")
        Severity: Minor
        Found in gradle/plugins/setup/src/main/kotlin/SetupPublication.kt - About 1 hr to fix

          Similar blocks of code found in 6 locations. Consider refactoring.
          Open

          /**
          * **Decorator interception as in MVIKotlin (via factory) or in Orbit (via ContainerDecorator).**
          *
          * * Best performance
          * * Less convenient configuration
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/arch/InterceptionTypesBenchmark.kt on lines 46..52
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/arch/InterceptionTypesBenchmark.kt on lines 54..55
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/arch/InterceptionTypesBenchmark.kt on lines 58..67
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/arch/InterceptionTypesBenchmark.kt on lines 69..71
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/arch/InterceptionTypesBenchmark.kt on lines 83..84

          Similar blocks of code found in 7 locations. Consider refactoring.
          Open

          @Benchmark
          fun direct__dispatcher_unconfined(bh: Blackhole) =
          bh.consume(FluxoBenchmark.mviReducerStaticIncrement(strategy = Direct, dispatcher = Unconfined))
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 58..60
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 62..64
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 67..69
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 80..82
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 84..86
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 89..91

          Similar blocks of code found in 6 locations. Consider refactoring.
          Open

          /**
          * **Complete pipeline interception as used in OkHttp, etc.**
          *
          * * Also has some similarities with Netty ChannelPipeline/ChannelHandler.
          */
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/arch/InterceptionTypesBenchmark.kt on lines 54..55
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/arch/InterceptionTypesBenchmark.kt on lines 58..67
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/arch/InterceptionTypesBenchmark.kt on lines 69..71
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/arch/InterceptionTypesBenchmark.kt on lines 74..81
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/arch/InterceptionTypesBenchmark.kt on lines 83..84

          Similar blocks of code found in 7 locations. Consider refactoring.
          Open

          @Benchmark
          fun fifo__dispatcher_unconfined(bh: Blackhole) =
          bh.consume(FluxoBenchmark.mviReducerStaticIncrement(strategy = Fifo, dispatcher = Unconfined))
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 58..60
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 67..69
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 80..82
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 84..86
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 89..91
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 93..95

          Similar blocks of code found in 7 locations. Consider refactoring.
          Open

          @Benchmark
          fun parallel__dispatcher_default(bh: Blackhole) =
          bh.consume(FluxoBenchmark.mviReducerStaticIncrement(strategy = Parallel, dispatcher = Default))
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 58..60
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 62..64
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 67..69
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 84..86
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 89..91
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 93..95

          Similar blocks of code found in 7 locations. Consider refactoring.
          Open

          @Benchmark
          fun parallel__dispatcher_unconfined(bh: Blackhole) =
          bh.consume(FluxoBenchmark.mviReducerStaticIncrement(strategy = Parallel, dispatcher = Unconfined))
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 58..60
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 62..64
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 67..69
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 80..82
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 89..91
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 93..95

          Similar blocks of code found in 6 locations. Consider refactoring.
          Open

          /**
          * **Complete pipeline interception, proceed with lambdas**
          *
          * * Doesn't require multiple implementaions for each action as simple interception chain
          * * Usage code is harder to read and maintain
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/arch/InterceptionTypesBenchmark.kt on lines 46..52
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/arch/InterceptionTypesBenchmark.kt on lines 54..55
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/arch/InterceptionTypesBenchmark.kt on lines 69..71
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/arch/InterceptionTypesBenchmark.kt on lines 74..81
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/arch/InterceptionTypesBenchmark.kt on lines 83..84

          Similar blocks of code found in 7 locations. Consider refactoring.
          Open

          @Benchmark
          fun fifo__dispatcher_default(bh: Blackhole) =
          bh.consume(FluxoBenchmark.mviReducerStaticIncrement(strategy = Fifo, dispatcher = Default))
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 62..64
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 67..69
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 80..82
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 84..86
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 89..91
          benchmarks/jmh/src/jmh/kotlin/kt/fluxo/jmh/IntentStrategyBenchmark.kt on lines 93..95
          Severity
          Category
          Status
          Source
          Language