MiniDigger/Hangar

View on GitHub
orePlayCommon/app/ore/OreConfig.scala

Summary

Maintainability
C
1 day
Test Coverage

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

    object users extends ConfigCategory {
      val raw: Configuration    = ore.raw.get[Configuration]("users")
      val starsPerPage: Int     = raw.get[Int]("stars-per-page")
      val maxTaglineLen: Int    = raw.get[Int]("max-tagline-len")
      val authorPageSize: Long  = raw.get[Long]("author-page-size")
Severity: Major
Found in orePlayCommon/app/ore/OreConfig.scala and 1 other location - About 1 hr to fix
orePlayCommon/app/ore/OreConfig.scala on lines 60..66

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 133.

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 2 locations. Consider refactoring.
Open

    object channels extends ConfigCategory {
      val raw: Configuration  = ore.raw.get[Configuration]("channels")
      val maxNameLen: Int     = raw.get[Int]("max-name-len")
      val nameRegex: String   = raw.get[String]("name-regex")
      val colorDefault: Int   = raw.get[Int]("color-default")
Severity: Major
Found in orePlayCommon/app/ore/OreConfig.scala and 1 other location - About 1 hr to fix
orePlayCommon/app/ore/OreConfig.scala on lines 92..98

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 133.

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 4 locations. Consider refactoring.
Open

      object session extends ConfigCategory {
        val raw: Configuration = api.raw.get[Configuration]("session")

        val publicExpiration: FiniteDuration = raw.get[FiniteDuration]("public-expiration")
        val expiration: FiniteDuration       = raw.get[FiniteDuration]("expiration")
Severity: Major
Found in orePlayCommon/app/ore/OreConfig.scala and 3 other locations - About 1 hr to fix
orePlayCommon/app/ore/OreConfig.scala on lines 100..105
orePlayCommon/app/ore/OreConfig.scala on lines 139..144
orePlayCommon/app/ore/OreConfig.scala on lines 168..173

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 111.

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 4 locations. Consider refactoring.
Open

      object breaker extends ConfigCategory {
        val raw: Configuration      = api.raw.get[Configuration]("breaker")
        val maxFailures: Int        = raw.get[Int]("max-failures")
        val reset: FiniteDuration   = raw.get[FiniteDuration]("reset")
        val timeout: FiniteDuration = raw.get[FiniteDuration]("timeout")
Severity: Major
Found in orePlayCommon/app/ore/OreConfig.scala and 3 other locations - About 1 hr to fix
orePlayCommon/app/ore/OreConfig.scala on lines 100..105
orePlayCommon/app/ore/OreConfig.scala on lines 115..122
orePlayCommon/app/ore/OreConfig.scala on lines 168..173

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 111.

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 4 locations. Consider refactoring.
Open

      object breaker extends ConfigCategory {
        val raw: Configuration      = api.raw.get[Configuration]("breaker")
        val maxFailures: Int        = raw.get[Int]("max-failures")
        val reset: FiniteDuration   = raw.get[FiniteDuration]("reset")
        val timeout: FiniteDuration = raw.get[FiniteDuration]("timeout")
Severity: Major
Found in orePlayCommon/app/ore/OreConfig.scala and 3 other locations - About 1 hr to fix
orePlayCommon/app/ore/OreConfig.scala on lines 100..105
orePlayCommon/app/ore/OreConfig.scala on lines 115..122
orePlayCommon/app/ore/OreConfig.scala on lines 139..144

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 111.

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 4 locations. Consider refactoring.
Open

    object orgs extends ConfigCategory {
      val raw: Configuration       = ore.raw.get[Configuration]("orgs")
      val enabled: Boolean         = raw.get[Boolean]("enabled")
      val dummyEmailDomain: String = raw.get[String]("dummyEmailDomain")
      val createLimit: Int         = raw.get[Int]("createLimit")
Severity: Major
Found in orePlayCommon/app/ore/OreConfig.scala and 3 other locations - About 1 hr to fix
orePlayCommon/app/ore/OreConfig.scala on lines 115..122
orePlayCommon/app/ore/OreConfig.scala on lines 139..144
orePlayCommon/app/ore/OreConfig.scala on lines 168..173

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 111.

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