pambrose/prometheus-proxy

View on GitHub
src/test/kotlin/io/prometheus/DataClassTest.kt

Summary

Maintainability
D
1 day
Test Coverage

Method metricsConfigTest has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  @Test
  fun metricsConfigTest() {
    newMetricsConfig(true, 555, configVals("agent.metrics.enabled=true").agent.metrics)
      .also {
        it.enabled.shouldBeTrue()
Severity: Minor
Found in src/test/kotlin/io/prometheus/DataClassTest.kt - About 1 hr to fix

    Method adminConfigTest has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      @Test
      fun adminConfigTest() {
        var vals = configVals("agent.admin.enabled=true")
        newAdminConfig(vals.agent.admin.enabled, -1, vals.agent.admin)
          .also {
    Severity: Minor
    Found in src/test/kotlin/io/prometheus/DataClassTest.kt - About 1 hr to fix

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

          newAdminConfig(true, 444, configVals("agent.admin.threadDumpPath=a threadDumpPath val").agent.admin)
            .also {
              it.threadDumpPath shouldBeEqualTo "a threadDumpPath val"
            }
      Severity: Major
      Found in src/test/kotlin/io/prometheus/DataClassTest.kt and 4 other locations - About 50 mins to fix
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 54..57
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 59..62
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 64..67
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 87..90

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 78.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          newMetricsConfig(true, 555, configVals("agent.metrics.path=a path val").agent.metrics)
            .also {
              it.path shouldBeEqualTo "a path val"
            }
      Severity: Major
      Found in src/test/kotlin/io/prometheus/DataClassTest.kt and 4 other locations - About 50 mins to fix
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 54..57
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 59..62
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 64..67
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 69..72

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 78.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          newAdminConfig(true, 444, configVals("agent.admin.versionPath=a versionpath val").agent.admin)
            .also {
              it.versionPath shouldBeEqualTo "a versionpath val"
            }
      Severity: Major
      Found in src/test/kotlin/io/prometheus/DataClassTest.kt and 4 other locations - About 50 mins to fix
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 54..57
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 64..67
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 69..72
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 87..90

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 78.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          newAdminConfig(true, 444, configVals("agent.admin.healthCheckPath=a healthCheckPath val").agent.admin)
            .also {
              it.healthCheckPath shouldBeEqualTo "a healthCheckPath val"
            }
      Severity: Major
      Found in src/test/kotlin/io/prometheus/DataClassTest.kt and 4 other locations - About 50 mins to fix
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 54..57
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 59..62
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 69..72
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 87..90

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 78.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          newAdminConfig(true, 444, configVals("agent.admin.pingPath=a pingpath val").agent.admin)
            .also {
              it.pingPath shouldBeEqualTo "a pingpath val"
            }
      Severity: Major
      Found in src/test/kotlin/io/prometheus/DataClassTest.kt and 4 other locations - About 50 mins to fix
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 59..62
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 64..67
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 69..72
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 87..90

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 78.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          newMetricsConfig(true, 555, configVals("agent.metrics.threadExportsEnabled=true").agent.metrics)
            .also {
              it.threadExportsEnabled.shouldBeTrue()
            }
      Severity: Major
      Found in src/test/kotlin/io/prometheus/DataClassTest.kt and 6 other locations - About 45 mins to fix
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 77..80
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 92..95
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 97..100
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 102..105
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 112..115
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 117..120

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          newMetricsConfig(true, 555, configVals("agent.metrics.versionInfoExportsEnabled=true").agent.metrics)
            .also {
              it.versionInfoExportsEnabled.shouldBeTrue()
            }
      Severity: Major
      Found in src/test/kotlin/io/prometheus/DataClassTest.kt and 6 other locations - About 45 mins to fix
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 77..80
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 92..95
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 97..100
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 102..105
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 107..110
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 112..115

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          newMetricsConfig(true, 555, configVals("agent.metrics.enabled=true").agent.metrics)
            .also {
              it.enabled.shouldBeTrue()
            }
      Severity: Major
      Found in src/test/kotlin/io/prometheus/DataClassTest.kt and 6 other locations - About 45 mins to fix
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 92..95
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 97..100
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 102..105
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 107..110
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 112..115
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 117..120

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          newMetricsConfig(true, 555, configVals("agent.metrics.memoryPoolsExportsEnabled=true").agent.metrics)
            .also {
              it.memoryPoolsExportsEnabled.shouldBeTrue()
            }
      Severity: Major
      Found in src/test/kotlin/io/prometheus/DataClassTest.kt and 6 other locations - About 45 mins to fix
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 77..80
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 92..95
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 102..105
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 107..110
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 112..115
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 117..120

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          newMetricsConfig(true, 555, configVals("agent.metrics.garbageCollectorExportsEnabled=true").agent.metrics)
            .also {
              it.garbageCollectorExportsEnabled.shouldBeTrue()
            }
      Severity: Major
      Found in src/test/kotlin/io/prometheus/DataClassTest.kt and 6 other locations - About 45 mins to fix
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 77..80
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 92..95
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 97..100
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 107..110
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 112..115
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 117..120

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          newMetricsConfig(true, 555, configVals("agent.metrics.standardExportsEnabled=true").agent.metrics)
            .also {
              it.standardExportsEnabled.shouldBeTrue()
            }
      Severity: Major
      Found in src/test/kotlin/io/prometheus/DataClassTest.kt and 6 other locations - About 45 mins to fix
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 77..80
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 97..100
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 102..105
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 107..110
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 112..115
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 117..120

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          newMetricsConfig(true, 555, configVals("agent.metrics.classLoadingExportsEnabled=true").agent.metrics)
            .also {
              it.classLoadingExportsEnabled.shouldBeTrue()
            }
      Severity: Major
      Found in src/test/kotlin/io/prometheus/DataClassTest.kt and 6 other locations - About 45 mins to fix
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 77..80
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 92..95
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 97..100
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 102..105
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 107..110
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 117..120

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          newZipkinConfig(configVals("agent.internal.zipkin.serviceName=a service name").agent.internal.zipkin)
            .also {
              it.serviceName shouldBeEqualTo "a service name"
            }
      Severity: Major
      Found in src/test/kotlin/io/prometheus/DataClassTest.kt and 2 other locations - About 40 mins to fix
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 130..133
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 140..143

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 71.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          newZipkinConfig(configVals("agent.internal.zipkin.hostname=testval").agent.internal.zipkin)
            .also {
              it.hostname shouldBeEqualTo "testval"
            }
      Severity: Major
      Found in src/test/kotlin/io/prometheus/DataClassTest.kt and 2 other locations - About 40 mins to fix
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 140..143
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 145..148

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 71.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          newZipkinConfig(configVals("agent.internal.zipkin.path=a path val").agent.internal.zipkin)
            .also {
              it.path shouldBeEqualTo "a path val"
            }
      Severity: Major
      Found in src/test/kotlin/io/prometheus/DataClassTest.kt and 2 other locations - About 40 mins to fix
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 130..133
      src/test/kotlin/io/prometheus/DataClassTest.kt on lines 145..148

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 71.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      There are no issues that match your filters.

      Category
      Status