sabirvirtuoso/Mockit

View on GitHub

Showing 131 of 148 total issues

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

  func testSameIntArrayArgumentsMatch() {
    // Given
    let firstArgument = [1, 2]
    let secondArgument = [1, 2]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 50 mins to fix
Example/Tests/MockMatcherTests.swift on lines 586..598
Example/Tests/MockMatcherTests.swift on lines 600..612
Example/Tests/MockMatcherTests.swift on lines 642..654
Example/Tests/MockMatcherTests.swift on lines 670..682
Example/Tests/MockMatcherTests.swift on lines 684..696
Example/Tests/MockMatcherTests.swift on lines 712..724
Example/Tests/MockMatcherTests.swift on lines 726..738
Example/Tests/MockMatcherTests.swift on lines 754..766
Example/Tests/MockMatcherTests.swift on lines 768..780

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

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 testDifferentDoubleArrayArgumentsDoNotMatch() {
    // Given
    let firstArgument = [10.12, 10.5]
    let secondArgument = [10.4, 10.12]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 50 mins to fix
Example/Tests/MockMatcherTests.swift on lines 586..598
Example/Tests/MockMatcherTests.swift on lines 600..612
Example/Tests/MockMatcherTests.swift on lines 628..640
Example/Tests/MockMatcherTests.swift on lines 642..654
Example/Tests/MockMatcherTests.swift on lines 670..682
Example/Tests/MockMatcherTests.swift on lines 684..696
Example/Tests/MockMatcherTests.swift on lines 712..724
Example/Tests/MockMatcherTests.swift on lines 754..766
Example/Tests/MockMatcherTests.swift on lines 768..780

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

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 testSameStringArrayArgumentsMatch() {
    // Given
    let firstArgument = ["one", "two"]
    let secondArgument = ["one", "two"]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 50 mins to fix
Example/Tests/MockMatcherTests.swift on lines 600..612
Example/Tests/MockMatcherTests.swift on lines 628..640
Example/Tests/MockMatcherTests.swift on lines 642..654
Example/Tests/MockMatcherTests.swift on lines 670..682
Example/Tests/MockMatcherTests.swift on lines 684..696
Example/Tests/MockMatcherTests.swift on lines 712..724
Example/Tests/MockMatcherTests.swift on lines 726..738
Example/Tests/MockMatcherTests.swift on lines 754..766
Example/Tests/MockMatcherTests.swift on lines 768..780

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

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 testDifferentIntArrayArgumentsDoNotMatch() {
    // Given
    let firstArgument = [2, 1]
    let secondArgument = [2, 2]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 50 mins to fix
Example/Tests/MockMatcherTests.swift on lines 586..598
Example/Tests/MockMatcherTests.swift on lines 600..612
Example/Tests/MockMatcherTests.swift on lines 628..640
Example/Tests/MockMatcherTests.swift on lines 670..682
Example/Tests/MockMatcherTests.swift on lines 684..696
Example/Tests/MockMatcherTests.swift on lines 712..724
Example/Tests/MockMatcherTests.swift on lines 726..738
Example/Tests/MockMatcherTests.swift on lines 754..766
Example/Tests/MockMatcherTests.swift on lines 768..780

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

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 testSameDoubleArrayArgumentsMatch() {
    // Given
    let firstArgument = [10.120, 10.130]
    let secondArgument = [10.120, 10.130]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 50 mins to fix
Example/Tests/MockMatcherTests.swift on lines 586..598
Example/Tests/MockMatcherTests.swift on lines 600..612
Example/Tests/MockMatcherTests.swift on lines 628..640
Example/Tests/MockMatcherTests.swift on lines 642..654
Example/Tests/MockMatcherTests.swift on lines 670..682
Example/Tests/MockMatcherTests.swift on lines 684..696
Example/Tests/MockMatcherTests.swift on lines 726..738
Example/Tests/MockMatcherTests.swift on lines 754..766
Example/Tests/MockMatcherTests.swift on lines 768..780

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

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 testSameFloatArrayArgumentsMatch() {
    // Given
    let firstArgument = [10.5, 10.6]
    let secondArgument = [10.5, 10.6]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 50 mins to fix
Example/Tests/MockMatcherTests.swift on lines 586..598
Example/Tests/MockMatcherTests.swift on lines 600..612
Example/Tests/MockMatcherTests.swift on lines 628..640
Example/Tests/MockMatcherTests.swift on lines 642..654
Example/Tests/MockMatcherTests.swift on lines 670..682
Example/Tests/MockMatcherTests.swift on lines 684..696
Example/Tests/MockMatcherTests.swift on lines 712..724
Example/Tests/MockMatcherTests.swift on lines 726..738
Example/Tests/MockMatcherTests.swift on lines 768..780

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

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 testDifferentNumberOfBoolArrayArgumentsDoNotMatch() {
    // Given
    let firstArgument = [true, true]
    let secondArgument = [true]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 50 mins to fix
Example/Tests/MockMatcherTests.swift on lines 614..626
Example/Tests/MockMatcherTests.swift on lines 656..668
Example/Tests/MockMatcherTests.swift on lines 740..752
Example/Tests/MockMatcherTests.swift on lines 782..794

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

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 testDifferentNumberOfIntArrayArgumentsDoNotMatch() {
    // Given
    let firstArgument = [2, 1]
    let secondArgument = [2]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 50 mins to fix
Example/Tests/MockMatcherTests.swift on lines 614..626
Example/Tests/MockMatcherTests.swift on lines 698..710
Example/Tests/MockMatcherTests.swift on lines 740..752
Example/Tests/MockMatcherTests.swift on lines 782..794

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

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 testDifferentNumberOfStringArrayArgumentsDoNotMatch() {
    // Given
    let firstArgument = ["one", "two"]
    let secondArgument = ["one"]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 50 mins to fix
Example/Tests/MockMatcherTests.swift on lines 656..668
Example/Tests/MockMatcherTests.swift on lines 698..710
Example/Tests/MockMatcherTests.swift on lines 740..752
Example/Tests/MockMatcherTests.swift on lines 782..794

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

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 testDifferentNumberOfDoubleArrayArgumentsDoNotMatch() {
    // Given
    let firstArgument = [10.5, 10.2]
    let secondArgument = [10.5]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 50 mins to fix
Example/Tests/MockMatcherTests.swift on lines 614..626
Example/Tests/MockMatcherTests.swift on lines 656..668
Example/Tests/MockMatcherTests.swift on lines 698..710
Example/Tests/MockMatcherTests.swift on lines 782..794

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

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 testDifferentNumberOfFloatArrayArgumentsDoNotMatch() {
    // Given
    let firstArgument = [10.5, 10.2]
    let secondArgument = [10.5]

Severity: Major
Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 50 mins to fix
Example/Tests/MockMatcherTests.swift on lines 614..626
Example/Tests/MockMatcherTests.swift on lines 656..668
Example/Tests/MockMatcherTests.swift on lines 698..710
Example/Tests/MockMatcherTests.swift on lines 740..752

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

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

  func testExpectNoMethod() {
    // Given

    // When
    sut.expectNoMethod()
Severity: Minor
Found in Example/Tests/ExampleTests.swift and 1 other location - About 45 mins to fix
Example/Tests/ExampleTests.swift on lines 166..176

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

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

  func testExpectAllThreeMethods() {
    // Given

    // When
    sut.expectAllThreeMethods()
Severity: Minor
Found in Example/Tests/ExampleTests.swift and 1 other location - About 45 mins to fix
Example/Tests/ExampleTests.swift on lines 178..188

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

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

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

    let actionable = sut?.call(withReturnValue: dummyReturnValue).thenDo {
      (args: [Any?]) -> Void in

      array.append(true)
    }
Severity: Minor
Found in Example/Tests/StubTests.swift and 1 other location - About 35 mins to fix
Example/Tests/StubTests.swift on lines 609..613

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

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

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

    let actionable = sut?.call(withReturnValue: dummyReturnValue).thenDo {
      (args: [Any?]) -> Void in

      array.append(true)
    }.thenDo {
Severity: Minor
Found in Example/Tests/StubTests.swift and 1 other location - About 35 mins to fix
Example/Tests/StubTests.swift on lines 488..492

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

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

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

  func accept(_ returnValue: Any?, ofFunction function: String, atFile file: String,
                     inLine line: Int, withArgs args: Any?...) -> Any? {
    argumentsOfSpecificCall = args

    return returnValue
Severity: Minor
Found in Example/Tests/MockTests.swift and 2 other locations - About 35 mins to fix
Mockit/Classes/CallHandler.swift on lines 1..47
Mockit/Classes/CallHandlerImpl.swift on lines 79..104

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

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

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

    let _ = (sut?.satisfyStub(withFunctionName: functionName))! && (sut?.satisfyStub(withActualArgs: [2, "two", true, nil]))!
Severity: Major
Found in Example/Tests/StubTests.swift and 5 other locations - About 35 mins to fix
Example/Tests/StubTests.swift on lines 404..404
Example/Tests/StubTests.swift on lines 432..432
Example/Tests/StubTests.swift on lines 630..630
Example/Tests/StubTests.swift on lines 767..767
Example/Tests/StubTests.swift on lines 807..807

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

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

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

//
//  Mockit
//
//  Copyright (c) 2016 Syed Sabir Salman-Al-Musawi <sabirvirtuoso@gmail.com>
//
Severity: Minor
Found in Mockit/Classes/CallHandler.swift and 2 other locations - About 35 mins to fix
Example/Tests/MockTests.swift on lines 62..67
Mockit/Classes/CallHandlerImpl.swift on lines 79..104

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

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

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

    let _ = (sut?.satisfyStub(withFunctionName: functionName))! && (sut?.satisfyStub(withActualArgs: [2, "two", true, nil]))!
Severity: Major
Found in Example/Tests/StubTests.swift and 5 other locations - About 35 mins to fix
Example/Tests/StubTests.swift on lines 404..404
Example/Tests/StubTests.swift on lines 583..583
Example/Tests/StubTests.swift on lines 630..630
Example/Tests/StubTests.swift on lines 767..767
Example/Tests/StubTests.swift on lines 807..807

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

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

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

    let _ = (sut?.satisfyStub(withFunctionName: functionName))! && (sut?.satisfyStub(withActualArgs: [2, "two", true, nil]))!
Severity: Major
Found in Example/Tests/StubTests.swift and 5 other locations - About 35 mins to fix
Example/Tests/StubTests.swift on lines 404..404
Example/Tests/StubTests.swift on lines 432..432
Example/Tests/StubTests.swift on lines 583..583
Example/Tests/StubTests.swift on lines 767..767
Example/Tests/StubTests.swift on lines 807..807

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

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

Severity
Category
Status
Source
Language