lucacasula91/SnackView

View on GitHub

Showing 26 of 26 total issues

Function spec has 223 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    override func spec() {

        var snackView: SnackView?
        var snackViewSpy: MockSnackViewDataSource?

Severity: Major
Found in Tests/SnackViewTests/SnackViewItemsTests.swift - About 1 day to fix

    Function spec has 67 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        override func spec() {
    
            var snackView: SnackView?
            var snackViewSpy: MockSnackViewDataSource?
    
    
    Severity: Major
    Found in Tests/SnackViewTests/SnackViewTests.swift - About 2 hrs to fix

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

                  it("had to have 'First name' as placeholder") {
                      snackViewSpy?.set(items: [textFieldItem])
                      snackView?.reloadData()
      
                      expect(textFieldItem.text).to(equal("John"))
      Severity: Major
      Found in Tests/SnackViewTests/SnackViewItemsTests.swift and 1 other location - About 1 hr to fix
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 184..191

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

      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

                  it("had to have 'title', 'description' and 'icon' property non nil.") {
                      snackViewSpy?.set(items: [applicationItem])
                      snackView?.reloadData()
      
                      expect(applicationItem.title).to(equal("My Application"))
      Severity: Major
      Found in Tests/SnackViewTests/SnackViewItemsTests.swift and 1 other location - About 1 hr to fix
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 74..81

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

      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

                          waitUntil(timeout: DispatchTimeInterval.seconds(3)) { (done) in
                              DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 2) {
                                  done()
                              }
                          }
      Severity: Minor
      Found in Tests/SnackViewTests/SnackViewTests.swift and 1 other location - About 50 mins to fix
      Tests/SnackViewTests/SnackViewTests.swift on lines 94..98

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 47.

      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

                          waitUntil(timeout: DispatchTimeInterval.seconds(3)) { (done) in
                              DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 2) {
                                  done()
                              }
                          }
      Severity: Minor
      Found in Tests/SnackViewTests/SnackViewTests.swift and 1 other location - About 50 mins to fix
      Tests/SnackViewTests/SnackViewTests.swift on lines 80..84

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

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

              describe("SVDetailTextItem from init with coder") {
                  let archiver = NSKeyedArchiver(requiringSecureCoding: false)
                  let detailedTextItem = SVDetailTextItem(coder: archiver)
      
                  it("had to return nil.") {
      Severity: Major
      Found in Tests/SnackViewTests/SnackViewItemsTests.swift and 10 other locations - About 45 mins to fix
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 60..67
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 84..91
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 117..124
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 144..151
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 171..178
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 193..200
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 217..224
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 251..258
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 271..278
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 305..312

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

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

                  describe("SVPriceRowItem from init with coder") {
                      let archiver = NSKeyedArchiver(requiringSecureCoding: false)
                      let priceRowItem = SVPriceRowItem(coder: archiver)
      
                      it("had to return nil.") {
      Severity: Major
      Found in Tests/SnackViewTests/SnackViewItemsTests.swift and 10 other locations - About 45 mins to fix
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 40..47
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 60..67
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 84..91
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 117..124
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 144..151
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 171..178
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 193..200
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 217..224
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 251..258
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 271..278

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

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

                  describe("SVButton from init with coder") {
                      let archiver = NSKeyedArchiver(requiringSecureCoding: false)
                      let buttonItem = SVButtonItem(coder: archiver)
      
                      it("had to return nil.") {
      Severity: Major
      Found in Tests/SnackViewTests/SnackViewItemsTests.swift and 10 other locations - About 45 mins to fix
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 40..47
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 60..67
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 84..91
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 117..124
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 144..151
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 171..178
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 193..200
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 251..258
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 271..278
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 305..312

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

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

                  describe("SVSliderItem from init with coder") {
                      let archiver = NSKeyedArchiver(requiringSecureCoding: false)
                      let sliderItem = SVSliderItem(coder: archiver)
      
                      it("had to return nil.") {
      Severity: Major
      Found in Tests/SnackViewTests/SnackViewItemsTests.swift and 10 other locations - About 45 mins to fix
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 40..47
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 60..67
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 84..91
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 117..124
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 144..151
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 171..178
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 193..200
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 217..224
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 251..258
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 305..312

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

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

              describe("SVDescriptionItem from init with coder") {
                  let archiver = NSKeyedArchiver(requiringSecureCoding: false)
                  let descriptionItem = SVDescriptionItem(coder: archiver)
      
                  it("had to return nil.") {
      Severity: Major
      Found in Tests/SnackViewTests/SnackViewItemsTests.swift and 10 other locations - About 45 mins to fix
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 40..47
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 84..91
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 117..124
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 144..151
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 171..178
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 193..200
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 217..224
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 251..258
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 271..278
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 305..312

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

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

              describe("SVTitleItem from init with coder") {
                  let archiver = NSKeyedArchiver(requiringSecureCoding: false)
                  let titleItem = SVTitleItem(coder: archiver)
      
                  it("had to return nil.") {
      Severity: Major
      Found in Tests/SnackViewTests/SnackViewItemsTests.swift and 10 other locations - About 45 mins to fix
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 40..47
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 60..67
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 84..91
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 144..151
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 171..178
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 193..200
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 217..224
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 251..258
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 271..278
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 305..312

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

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

              describe("SVTextFieldItem from init with coder") {
                  let archiver = NSKeyedArchiver(requiringSecureCoding: false)
                  let textFieldItem = SVTextFieldItem(coder: archiver)
      
                  it("had to return nil.") {
      Severity: Major
      Found in Tests/SnackViewTests/SnackViewItemsTests.swift and 10 other locations - About 45 mins to fix
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 40..47
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 60..67
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 117..124
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 144..151
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 171..178
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 193..200
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 217..224
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 251..258
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 271..278
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 305..312

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

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

                  describe("SVTitleItem from init with coder") {
                      let archiver = NSKeyedArchiver(requiringSecureCoding: false)
                      let imageView = SVImageViewItem(coder: archiver)
      
                      it("had to return nil.") {
      Severity: Major
      Found in Tests/SnackViewTests/SnackViewItemsTests.swift and 10 other locations - About 45 mins to fix
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 40..47
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 60..67
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 84..91
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 117..124
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 171..178
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 193..200
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 217..224
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 251..258
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 271..278
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 305..312

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

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

                  describe("SVApplicationItem from init with coder") {
                      let archiver = NSKeyedArchiver(requiringSecureCoding: false)
                      let applicationItem = SVApplicationItem(coder: archiver)
      
                      it("had to return nil.") {
      Severity: Major
      Found in Tests/SnackViewTests/SnackViewItemsTests.swift and 10 other locations - About 45 mins to fix
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 40..47
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 60..67
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 84..91
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 117..124
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 144..151
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 171..178
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 217..224
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 251..258
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 271..278
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 305..312

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

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

                  describe("SVLoaderItem from init with coder") {
                      let archiver = NSKeyedArchiver(requiringSecureCoding: false)
                      let loaderItem = SVLoaderItem(coder: archiver)
      
                      it("had to return nil.") {
      Severity: Major
      Found in Tests/SnackViewTests/SnackViewItemsTests.swift and 10 other locations - About 45 mins to fix
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 40..47
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 60..67
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 84..91
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 117..124
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 144..151
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 171..178
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 193..200
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 217..224
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 271..278
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 305..312

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

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

                  describe("SVSwitchItem from init with coder") {
                      let archiver = NSKeyedArchiver(requiringSecureCoding: false)
                      let switchItem = SVSwitchItem(coder: archiver)
      
                      it("had to return nil.") {
      Severity: Major
      Found in Tests/SnackViewTests/SnackViewItemsTests.swift and 10 other locations - About 45 mins to fix
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 40..47
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 60..67
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 84..91
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 117..124
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 144..151
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 193..200
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 217..224
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 251..258
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 271..278
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 305..312

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

      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

                  it("with long text had to have at least 50 px of height.") {
                      snackViewSpy?.set(items: [detailedTextItem])
                      snackView?.reloadData()
      
                      expect(detailedTextItem.frame.height).to(beGreaterThan(50))
      Severity: Minor
      Found in Tests/SnackViewTests/SnackViewItemsTests.swift and 1 other location - About 35 mins to fix
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 52..57

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

      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

                  it("with long text had to have at least 50 px of height.") {
                      snackViewSpy?.set(items: [descriptionItem])
                      snackView?.reloadData()
      
                      expect(descriptionItem.frame.height).to(beGreaterThan(50))
      Severity: Minor
      Found in Tests/SnackViewTests/SnackViewItemsTests.swift and 1 other location - About 35 mins to fix
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 32..37

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

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

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

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

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

      Refactorings

      Further Reading

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

                  it("had to have 'height' constraint setted to 123.") {
                      snackViewSpy?.set(items: [imageView])
                      snackView?.reloadData()
      
                      expect(imageView.currentHeight).to(equal(123))
      Severity: Major
      Found in Tests/SnackViewTests/SnackViewItemsTests.swift and 3 other locations - About 35 mins to fix
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 264..269
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 291..296
      Tests/SnackViewTests/SnackViewItemsTests.swift on lines 298..303

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

      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