sabirvirtuoso/Mockit

View on GitHub

Showing 148 of 148 total issues

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

  func testSameOptionalDoubleArrayArgumentsMatch() {
    // Given
    let firstArgument: [Double?] = [10.120, 10.130, nil]
    let secondArgument: [Double?] = [10.120, 10.130, nil]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 1 hr to fix
Example/Tests/MockMatcherTests.swift on lines 354..366
Example/Tests/MockMatcherTests.swift on lines 368..380
Example/Tests/MockMatcherTests.swift on lines 396..408
Example/Tests/MockMatcherTests.swift on lines 410..422
Example/Tests/MockMatcherTests.swift on lines 438..450
Example/Tests/MockMatcherTests.swift on lines 452..464
Example/Tests/MockMatcherTests.swift on lines 494..506
Example/Tests/MockMatcherTests.swift on lines 522..534
Example/Tests/MockMatcherTests.swift on lines 536..548

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

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

public class FloatMatcher: TypeMatcher {

  public func match(argument arg: Any, withArgument withArg: Any) -> Bool {
    switch (arg, withArg) {
      case (let firstArg as Float, let secondArg as Float):
Severity: Major
Found in Mockit/Classes/TypeMatcher.swift and 4 other locations - About 1 hr to fix
Mockit/Classes/TypeMatcher.swift on lines 40..51
Mockit/Classes/TypeMatcher.swift on lines 57..68
Mockit/Classes/TypeMatcher.swift on lines 74..85
Mockit/Classes/TypeMatcher.swift on lines 91..102

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

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

public class BoolMatcher: TypeMatcher {

  public func match(argument arg: Any, withArgument withArg: Any) -> Bool {
    switch (arg, withArg) {
      case (let firstArg as Bool, let secondArg as Bool):
Severity: Major
Found in Mockit/Classes/TypeMatcher.swift and 4 other locations - About 1 hr to fix
Mockit/Classes/TypeMatcher.swift on lines 40..51
Mockit/Classes/TypeMatcher.swift on lines 74..85
Mockit/Classes/TypeMatcher.swift on lines 91..102
Mockit/Classes/TypeMatcher.swift on lines 108..119

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

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

  func testSameOptionalFloatArrayArgumentsMatch() {
    // Given
    let firstArgument: [Float?] = [10.5, 10.6, nil]
    let secondArgument: [Float?] = [10.5, 10.6, nil]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 1 hr to fix
Example/Tests/MockMatcherTests.swift on lines 354..366
Example/Tests/MockMatcherTests.swift on lines 368..380
Example/Tests/MockMatcherTests.swift on lines 396..408
Example/Tests/MockMatcherTests.swift on lines 410..422
Example/Tests/MockMatcherTests.swift on lines 438..450
Example/Tests/MockMatcherTests.swift on lines 452..464
Example/Tests/MockMatcherTests.swift on lines 480..492
Example/Tests/MockMatcherTests.swift on lines 494..506
Example/Tests/MockMatcherTests.swift on lines 536..548

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

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

  func testSameOptionalBoolArrayArgumentsMatch() {
    // Given
    let firstArgument: [Bool?] = [true, false, nil]
    let secondArgument: [Bool?] = [true, false, nil]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 1 hr to fix
Example/Tests/MockMatcherTests.swift on lines 354..366
Example/Tests/MockMatcherTests.swift on lines 368..380
Example/Tests/MockMatcherTests.swift on lines 396..408
Example/Tests/MockMatcherTests.swift on lines 410..422
Example/Tests/MockMatcherTests.swift on lines 452..464
Example/Tests/MockMatcherTests.swift on lines 480..492
Example/Tests/MockMatcherTests.swift on lines 494..506
Example/Tests/MockMatcherTests.swift on lines 522..534
Example/Tests/MockMatcherTests.swift on lines 536..548

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

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

public class IntMatcher: TypeMatcher {

  public func match(argument arg: Any, withArgument withArg: Any) -> Bool {
    switch (arg, withArg) {
      case (let firstArg as Int, let secondArg as Int):
Severity: Major
Found in Mockit/Classes/TypeMatcher.swift and 4 other locations - About 1 hr to fix
Mockit/Classes/TypeMatcher.swift on lines 40..51
Mockit/Classes/TypeMatcher.swift on lines 57..68
Mockit/Classes/TypeMatcher.swift on lines 91..102
Mockit/Classes/TypeMatcher.swift on lines 108..119

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

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

public class DoubleMatcher: TypeMatcher {

  public func match(argument arg: Any, withArgument withArg: Any) -> Bool {
    switch (arg, withArg) {
      case (let firstArg as Double, let secondArg as Double):
Severity: Major
Found in Mockit/Classes/TypeMatcher.swift and 4 other locations - About 1 hr to fix
Mockit/Classes/TypeMatcher.swift on lines 40..51
Mockit/Classes/TypeMatcher.swift on lines 57..68
Mockit/Classes/TypeMatcher.swift on lines 74..85
Mockit/Classes/TypeMatcher.swift on lines 108..119

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

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

  func testDifferentOptionalStringArrayArgumentsDoNotMatch() {
    // Given
    let firstArgument: [String?] = ["one", "two", nil]
    let secondArgument: [String?] = ["one", "three", nil]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 1 hr to fix
Example/Tests/MockMatcherTests.swift on lines 354..366
Example/Tests/MockMatcherTests.swift on lines 396..408
Example/Tests/MockMatcherTests.swift on lines 410..422
Example/Tests/MockMatcherTests.swift on lines 438..450
Example/Tests/MockMatcherTests.swift on lines 452..464
Example/Tests/MockMatcherTests.swift on lines 480..492
Example/Tests/MockMatcherTests.swift on lines 494..506
Example/Tests/MockMatcherTests.swift on lines 522..534
Example/Tests/MockMatcherTests.swift on lines 536..548

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

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

  func testDifferentOptionalDoubleArrayArgumentsDoNotMatch() {
    // Given
    let firstArgument: [Double?] = [10.12, 10.5, nil]
    let secondArgument: [Double?] = [10.4, 10.12, nil]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 1 hr to fix
Example/Tests/MockMatcherTests.swift on lines 354..366
Example/Tests/MockMatcherTests.swift on lines 368..380
Example/Tests/MockMatcherTests.swift on lines 396..408
Example/Tests/MockMatcherTests.swift on lines 410..422
Example/Tests/MockMatcherTests.swift on lines 438..450
Example/Tests/MockMatcherTests.swift on lines 452..464
Example/Tests/MockMatcherTests.swift on lines 480..492
Example/Tests/MockMatcherTests.swift on lines 522..534
Example/Tests/MockMatcherTests.swift on lines 536..548

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

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

public class StringMatcher: TypeMatcher {

  public func match(argument arg: Any, withArgument withArg: Any) -> Bool {
    switch (arg, withArg) {
      case (let firstArg as String, let secondArg as String):
Severity: Major
Found in Mockit/Classes/TypeMatcher.swift and 4 other locations - About 1 hr to fix
Mockit/Classes/TypeMatcher.swift on lines 57..68
Mockit/Classes/TypeMatcher.swift on lines 74..85
Mockit/Classes/TypeMatcher.swift on lines 91..102
Mockit/Classes/TypeMatcher.swift on lines 108..119

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

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

  func testDifferentNumberOfOptionalBoolArrayArgumentsDoNotMatch() {
    // Given
    let firstArgument: [Bool?] = [true, true, nil]
    let secondArgument: [Bool?] = [true, nil]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 1 hr to fix
Example/Tests/MockMatcherTests.swift on lines 382..394
Example/Tests/MockMatcherTests.swift on lines 424..436
Example/Tests/MockMatcherTests.swift on lines 508..520
Example/Tests/MockMatcherTests.swift on lines 550..562

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

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

  func testDifferentNumberOfOptionalIntArrayArgumentsDoNotMatch() {
    // Given
    let firstArgument: [Int?] = [2, 1, nil]
    let secondArgument: [Int?] = [2, nil]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 1 hr to fix
Example/Tests/MockMatcherTests.swift on lines 382..394
Example/Tests/MockMatcherTests.swift on lines 466..478
Example/Tests/MockMatcherTests.swift on lines 508..520
Example/Tests/MockMatcherTests.swift on lines 550..562

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

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

  func testDifferentNumberOfOptionalStringArrayArgumentsDoNotMatch() {
    // Given
    let firstArgument: [String?] = ["one", "two", nil]
    let secondArgument: [String?] = ["one", nil]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 1 hr to fix
Example/Tests/MockMatcherTests.swift on lines 424..436
Example/Tests/MockMatcherTests.swift on lines 466..478
Example/Tests/MockMatcherTests.swift on lines 508..520
Example/Tests/MockMatcherTests.swift on lines 550..562

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

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

  func testDifferentNumberOfOptionalDoubleArrayArgumentsDoNotMatch() {
    // Given
    let firstArgument: [Double?] = [10.5, 10.2, nil]
    let secondArgument: [Double?] = [10.5, nil]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 1 hr to fix
Example/Tests/MockMatcherTests.swift on lines 382..394
Example/Tests/MockMatcherTests.swift on lines 424..436
Example/Tests/MockMatcherTests.swift on lines 466..478
Example/Tests/MockMatcherTests.swift on lines 550..562

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

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

  func testDifferentNumberOfOptionalFloatArrayArgumentsDoNotMatch() {
    // Given
    let firstArgument: [Float?] = [10.5, 10.2, nil]
    let secondArgument: [Float?] = [10.5, nil]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 1 hr to fix
Example/Tests/MockMatcherTests.swift on lines 382..394
Example/Tests/MockMatcherTests.swift on lines 424..436
Example/Tests/MockMatcherTests.swift on lines 466..478
Example/Tests/MockMatcherTests.swift on lines 508..520

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

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

Function testCallingStubMultipleTimesWithSuccessfulArgumentMatchingThenDoCorrespondingActions has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  func testCallingStubMultipleTimesWithSuccessfulArgumentMatchingThenDoCorrespondingActions() {
    // Given
    let sut = stub

    let functionName = "func"
Severity: Minor
Found in Example/Tests/StubTests.swift - About 1 hr to fix

    Function match has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      public func match(argument arg: Any, withArgument withArg: Any) -> Bool {
        switch (arg, withArg) {
          case (let firstArg as Dictionary<String, Any?>, let secondArg as Dictionary<String, Any?>):
            return match(firstArg, withDictionary: secondArg)
          case (let firstArg as Dictionary<String, String?>, let secondArg as Dictionary<String, String?>):
    Severity: Minor
    Found in Mockit/Classes/TypeMatcher.swift - About 1 hr to fix

      Function match has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        public func match(argument arg: Any, withArgument withArg: Any) -> Bool {
          switch (arg, withArg) {
            case (let firstArg as Dictionary<String, Any>, let secondArg as Dictionary<String, Any>):
              return match(firstArg, withDictionary: secondArg)
            case (let firstArg as Dictionary<String, String>, let secondArg as Dictionary<String, String>):
      Severity: Minor
      Found in Mockit/Classes/TypeMatcher.swift - About 1 hr to fix

        Function testCallingStubMultipleTimesWithSuccessfulArgumentMatchingInSomeCallsThenDoLastActionForNonCorrespondingCalls has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          func testCallingStubMultipleTimesWithSuccessfulArgumentMatchingInSomeCallsThenDoLastActionForNonCorrespondingCalls() {
            // Given
            let sut = stub
        
            let functionName = "func"
        Severity: Minor
        Found in Example/Tests/StubTests.swift - About 1 hr to fix

          Function testCallingStubMultipleTimesWithSuccessfulArgumentMatchingInSomeCallsThenDoCorrespondingActions has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            func testCallingStubMultipleTimesWithSuccessfulArgumentMatchingInSomeCallsThenDoCorrespondingActions() {
              // Given
              let sut = stub
          
              let functionName = "func"
          Severity: Minor
          Found in Example/Tests/StubTests.swift - About 1 hr to fix
            Severity
            Category
            Status
            Source
            Language