brightdigit/MistKit

View on GitHub
Sources/MistKit/Models/MKAnyRecord.swift

Summary

Maintainability
C
1 day
Test Coverage

File should contain 200 lines or less: currently contains 217
Open

}

public declarations should be documented.
Open

  func data(fromKey key: String) throws -> Data {

public declarations should be documented.
Open

  func assetIfExists(fromKey key: String) throws -> MKAsset? {

public declarations should be documented.
Open

  func double(fromKey key: String) throws -> Double {

public declarations should be documented.
Open

  func dataIfExists(fromKey key: String) throws -> Data? {

public declarations should be documented.
Open

public extension MKAnyRecord {

public declarations should be documented.
Open

  func stringIfExists(fromKey key: String) throws -> String? {

public declarations should be documented.
Open

  func string(fromKey key: String) throws -> String {

public declarations should be documented.
Open

  func locationIfExists(fromKey key: String) throws -> MKLocation? {

public declarations should be documented.
Open

  func dateIfExists(fromKey key: String) throws -> Date? {

public declarations should be documented.
Open

  func doubleIfExists(fromKey key: String) throws -> Double? {

public declarations should be documented.
Open

  func asset(fromKey key: String) throws -> MKAsset {

public declarations should be documented.
Open

  func date(fromKey key: String) throws -> Date {

public declarations should be documented.
Open

  func integer(fromKey key: String) throws -> Int64 {

public declarations should be documented.
Open

  func location(fromKey key: String) throws -> MKLocation {

public declarations should be documented.
Open

  func integerIfExists(fromKey key: String) throws -> Int64? {

public declarations should be documented.
Open

public extension Array where Element == MKAnyRecord {

public declarations should be documented.
Open

  var information: String {

public declarations should be documented.
Open

  var information: String {

public declarations should be documented.
Open

public extension MKAnyRecord {

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

  func dateIfExists(fromKey key: String) throws -> Date? {
    switch fields[key] {
    case let .date(value):
      return value

Severity: Major
Found in Sources/MistKit/Models/MKAnyRecord.swift and 6 other locations - About 1 hr to fix
Sources/MistKit/Models/MKAnyRecord.swift on lines 95..106
Sources/MistKit/Models/MKAnyRecord.swift on lines 108..119
Sources/MistKit/Models/MKAnyRecord.swift on lines 121..132
Sources/MistKit/Models/MKAnyRecord.swift on lines 147..158
Sources/MistKit/Models/MKAnyRecord.swift on lines 160..171
Sources/MistKit/Models/MKAnyRecord.swift on lines 173..184

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

  func locationIfExists(fromKey key: String) throws -> MKLocation? {
    switch fields[key] {
    case let .location(value):
      return value

Severity: Major
Found in Sources/MistKit/Models/MKAnyRecord.swift and 6 other locations - About 1 hr to fix
Sources/MistKit/Models/MKAnyRecord.swift on lines 95..106
Sources/MistKit/Models/MKAnyRecord.swift on lines 108..119
Sources/MistKit/Models/MKAnyRecord.swift on lines 121..132
Sources/MistKit/Models/MKAnyRecord.swift on lines 134..145
Sources/MistKit/Models/MKAnyRecord.swift on lines 147..158
Sources/MistKit/Models/MKAnyRecord.swift on lines 173..184

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

  func assetIfExists(fromKey key: String) throws -> MKAsset? {
    switch fields[key] {
    case let .asset(value):
      return value

Severity: Major
Found in Sources/MistKit/Models/MKAnyRecord.swift and 6 other locations - About 1 hr to fix
Sources/MistKit/Models/MKAnyRecord.swift on lines 95..106
Sources/MistKit/Models/MKAnyRecord.swift on lines 108..119
Sources/MistKit/Models/MKAnyRecord.swift on lines 121..132
Sources/MistKit/Models/MKAnyRecord.swift on lines 134..145
Sources/MistKit/Models/MKAnyRecord.swift on lines 147..158
Sources/MistKit/Models/MKAnyRecord.swift on lines 160..171

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

  func dataIfExists(fromKey key: String) throws -> Data? {
    switch fields[key] {
    case let .data(value):
      return value

Severity: Major
Found in Sources/MistKit/Models/MKAnyRecord.swift and 6 other locations - About 1 hr to fix
Sources/MistKit/Models/MKAnyRecord.swift on lines 108..119
Sources/MistKit/Models/MKAnyRecord.swift on lines 121..132
Sources/MistKit/Models/MKAnyRecord.swift on lines 134..145
Sources/MistKit/Models/MKAnyRecord.swift on lines 147..158
Sources/MistKit/Models/MKAnyRecord.swift on lines 160..171
Sources/MistKit/Models/MKAnyRecord.swift on lines 173..184

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

  func doubleIfExists(fromKey key: String) throws -> Double? {
    switch fields[key] {
    case let .double(value):
      return value

Severity: Major
Found in Sources/MistKit/Models/MKAnyRecord.swift and 6 other locations - About 1 hr to fix
Sources/MistKit/Models/MKAnyRecord.swift on lines 95..106
Sources/MistKit/Models/MKAnyRecord.swift on lines 108..119
Sources/MistKit/Models/MKAnyRecord.swift on lines 121..132
Sources/MistKit/Models/MKAnyRecord.swift on lines 134..145
Sources/MistKit/Models/MKAnyRecord.swift on lines 160..171
Sources/MistKit/Models/MKAnyRecord.swift on lines 173..184

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

  func stringIfExists(fromKey key: String) throws -> String? {
    switch fields[key] {
    case let .string(value):
      return value

Severity: Major
Found in Sources/MistKit/Models/MKAnyRecord.swift and 6 other locations - About 1 hr to fix
Sources/MistKit/Models/MKAnyRecord.swift on lines 95..106
Sources/MistKit/Models/MKAnyRecord.swift on lines 121..132
Sources/MistKit/Models/MKAnyRecord.swift on lines 134..145
Sources/MistKit/Models/MKAnyRecord.swift on lines 147..158
Sources/MistKit/Models/MKAnyRecord.swift on lines 160..171
Sources/MistKit/Models/MKAnyRecord.swift on lines 173..184

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

  func integerIfExists(fromKey key: String) throws -> Int64? {
    switch fields[key] {
    case let .integer(value):
      return value

Severity: Major
Found in Sources/MistKit/Models/MKAnyRecord.swift and 6 other locations - About 1 hr to fix
Sources/MistKit/Models/MKAnyRecord.swift on lines 95..106
Sources/MistKit/Models/MKAnyRecord.swift on lines 108..119
Sources/MistKit/Models/MKAnyRecord.swift on lines 134..145
Sources/MistKit/Models/MKAnyRecord.swift on lines 147..158
Sources/MistKit/Models/MKAnyRecord.swift on lines 160..171
Sources/MistKit/Models/MKAnyRecord.swift on lines 173..184

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

  func string(fromKey key: String) throws -> String {
    switch fields[key] {
    case let .string(value):
      return value

Severity: Major
Found in Sources/MistKit/Models/MKAnyRecord.swift and 6 other locations - About 50 mins to fix
Sources/MistKit/Models/MKAnyRecord.swift on lines 25..33
Sources/MistKit/Models/MKAnyRecord.swift on lines 45..53
Sources/MistKit/Models/MKAnyRecord.swift on lines 55..63
Sources/MistKit/Models/MKAnyRecord.swift on lines 65..73
Sources/MistKit/Models/MKAnyRecord.swift on lines 75..83
Sources/MistKit/Models/MKAnyRecord.swift on lines 85..93

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

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

  func double(fromKey key: String) throws -> Double {
    switch fields[key] {
    case let .double(value):
      return value

Severity: Major
Found in Sources/MistKit/Models/MKAnyRecord.swift and 6 other locations - About 50 mins to fix
Sources/MistKit/Models/MKAnyRecord.swift on lines 25..33
Sources/MistKit/Models/MKAnyRecord.swift on lines 35..43
Sources/MistKit/Models/MKAnyRecord.swift on lines 45..53
Sources/MistKit/Models/MKAnyRecord.swift on lines 55..63
Sources/MistKit/Models/MKAnyRecord.swift on lines 75..83
Sources/MistKit/Models/MKAnyRecord.swift on lines 85..93

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

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

  func integer(fromKey key: String) throws -> Int64 {
    switch fields[key] {
    case let .integer(value):
      return value

Severity: Major
Found in Sources/MistKit/Models/MKAnyRecord.swift and 6 other locations - About 50 mins to fix
Sources/MistKit/Models/MKAnyRecord.swift on lines 25..33
Sources/MistKit/Models/MKAnyRecord.swift on lines 35..43
Sources/MistKit/Models/MKAnyRecord.swift on lines 55..63
Sources/MistKit/Models/MKAnyRecord.swift on lines 65..73
Sources/MistKit/Models/MKAnyRecord.swift on lines 75..83
Sources/MistKit/Models/MKAnyRecord.swift on lines 85..93

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

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

  func location(fromKey key: String) throws -> MKLocation {
    switch fields[key] {
    case let .location(value):
      return value

Severity: Major
Found in Sources/MistKit/Models/MKAnyRecord.swift and 6 other locations - About 50 mins to fix
Sources/MistKit/Models/MKAnyRecord.swift on lines 25..33
Sources/MistKit/Models/MKAnyRecord.swift on lines 35..43
Sources/MistKit/Models/MKAnyRecord.swift on lines 45..53
Sources/MistKit/Models/MKAnyRecord.swift on lines 55..63
Sources/MistKit/Models/MKAnyRecord.swift on lines 65..73
Sources/MistKit/Models/MKAnyRecord.swift on lines 85..93

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

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

  func data(fromKey key: String) throws -> Data {
    switch fields[key] {
    case let .data(value):
      return value

Severity: Major
Found in Sources/MistKit/Models/MKAnyRecord.swift and 6 other locations - About 50 mins to fix
Sources/MistKit/Models/MKAnyRecord.swift on lines 35..43
Sources/MistKit/Models/MKAnyRecord.swift on lines 45..53
Sources/MistKit/Models/MKAnyRecord.swift on lines 55..63
Sources/MistKit/Models/MKAnyRecord.swift on lines 65..73
Sources/MistKit/Models/MKAnyRecord.swift on lines 75..83
Sources/MistKit/Models/MKAnyRecord.swift on lines 85..93

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

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

  func date(fromKey key: String) throws -> Date {
    switch fields[key] {
    case let .date(value):
      return value

Severity: Major
Found in Sources/MistKit/Models/MKAnyRecord.swift and 6 other locations - About 50 mins to fix
Sources/MistKit/Models/MKAnyRecord.swift on lines 25..33
Sources/MistKit/Models/MKAnyRecord.swift on lines 35..43
Sources/MistKit/Models/MKAnyRecord.swift on lines 45..53
Sources/MistKit/Models/MKAnyRecord.swift on lines 65..73
Sources/MistKit/Models/MKAnyRecord.swift on lines 75..83
Sources/MistKit/Models/MKAnyRecord.swift on lines 85..93

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

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

  func asset(fromKey key: String) throws -> MKAsset {
    switch fields[key] {
    case let .asset(value):
      return value

Severity: Major
Found in Sources/MistKit/Models/MKAnyRecord.swift and 6 other locations - About 50 mins to fix
Sources/MistKit/Models/MKAnyRecord.swift on lines 25..33
Sources/MistKit/Models/MKAnyRecord.swift on lines 35..43
Sources/MistKit/Models/MKAnyRecord.swift on lines 45..53
Sources/MistKit/Models/MKAnyRecord.swift on lines 55..63
Sources/MistKit/Models/MKAnyRecord.swift on lines 65..73
Sources/MistKit/Models/MKAnyRecord.swift on lines 75..83

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

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