asteris-llc/converge

View on GitHub
resource/unarchive/unarchive_test.go

Summary

Maintainability
F
1 wk
Test Coverage

File unarchive_test.go has 1127 lines of code (exceeds 500 allowed). Consider refactoring.
Open

// Copyright © 2017 Asteris, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
Severity: Major
Found in resource/unarchive/unarchive_test.go - About 2 days to fix

    Function TestEvaluateDuplicates has 248 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func TestEvaluateDuplicates(t *testing.T) {
        t.Parallel()
    
        t.Run("no duplicates", func(t *testing.T) {
            destDir, err := ioutil.TempDir("", "destDir_unarchive")
    Severity: Major
    Found in resource/unarchive/unarchive_test.go - About 1 day to fix

      Function TestApply has 247 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func TestApply(t *testing.T) {
          t.Parallel()
      
          srcDir, err := ioutil.TempDir("", "unarchive_srcDir")
          require.NoError(t, err)
      Severity: Major
      Found in resource/unarchive/unarchive_test.go - About 1 day to fix

        Function TestCopyToFinalDest has 213 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func TestCopyToFinalDest(t *testing.T) {
            t.Parallel()
        
            t.Run("no duplicates", func(t *testing.T) {
                destDir, err := ioutil.TempDir("", "destDir_unarchive")
        Severity: Major
        Found in resource/unarchive/unarchive_test.go - About 7 hrs to fix

          Function TestSetDirsAndContents has 106 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func TestSetDirsAndContents(t *testing.T) {
              t.Parallel()
          
              srcFile, err := ioutil.TempFile("", "unarchive_test.zip")
              require.NoError(t, err)
          Severity: Major
          Found in resource/unarchive/unarchive_test.go - About 3 hrs to fix

            Function TestCheck has 70 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func TestCheck(t *testing.T) {
                t.Parallel()
            
                srcFile, err := ioutil.TempFile("", "unarchive_test.txt")
                require.NoError(t, err)
            Severity: Minor
            Found in resource/unarchive/unarchive_test.go - About 1 hr to fix

              Function TestEvaluateDuplicates has 12 return statements (exceeds 4 allowed).
              Open

              func TestEvaluateDuplicates(t *testing.T) {
                  t.Parallel()
              
                  t.Run("no duplicates", func(t *testing.T) {
                      destDir, err := ioutil.TempDir("", "destDir_unarchive")
              Severity: Major
              Found in resource/unarchive/unarchive_test.go - About 1 hr to fix

                Function TestCopyToFinalDest has 12 return statements (exceeds 4 allowed).
                Open

                func TestCopyToFinalDest(t *testing.T) {
                    t.Parallel()
                
                    t.Run("no duplicates", func(t *testing.T) {
                        destDir, err := ioutil.TempDir("", "destDir_unarchive")
                Severity: Major
                Found in resource/unarchive/unarchive_test.go - About 1 hr to fix

                  Function TestDiff has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                  Open

                  func TestDiff(t *testing.T) {
                      t.Parallel()
                  
                      src, err := ioutil.TempFile("", "unarchive_test.txt")
                      require.NoError(t, err)
                  Severity: Minor
                  Found in resource/unarchive/unarchive_test.go - About 1 hr to fix

                    Function zipFiles has 10 return statements (exceeds 4 allowed).
                    Open

                    func zipFiles(source, destination string) error {
                        base := ""
                    
                        zipFile, err := os.Create(destination)
                        if err != nil {
                    Severity: Major
                    Found in resource/unarchive/unarchive_test.go - About 1 hr to fix

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

                              assert.True(t, strings.Contains(act[0], exp[0]) || strings.Contains(act[1], exp[0]) || strings.Contains(act[2], exp[0]) || strings.Contains(act[3], exp[0]) || strings.Contains(act[4], exp[0]))
                      Severity: Major
                      Found in resource/unarchive/unarchive_test.go and 9 other locations - About 45 mins to fix
                      resource/unarchive/unarchive_test.go on lines 1104..1104
                      resource/unarchive/unarchive_test.go on lines 1105..1105
                      resource/unarchive/unarchive_test.go on lines 1106..1106
                      resource/unarchive/unarchive_test.go on lines 1107..1107
                      resource/unarchive/unarchive_test.go on lines 1108..1108
                      resource/unarchive/unarchive_test.go on lines 1303..1303
                      resource/unarchive/unarchive_test.go on lines 1304..1304
                      resource/unarchive/unarchive_test.go on lines 1305..1305
                      resource/unarchive/unarchive_test.go on lines 1306..1306

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

                      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

                              assert.True(t, strings.Contains(act[0], exp[2]) || strings.Contains(act[1], exp[2]) || strings.Contains(act[2], exp[2]) || strings.Contains(act[3], exp[2]) || strings.Contains(act[4], exp[2]))
                      Severity: Major
                      Found in resource/unarchive/unarchive_test.go and 9 other locations - About 45 mins to fix
                      resource/unarchive/unarchive_test.go on lines 1104..1104
                      resource/unarchive/unarchive_test.go on lines 1105..1105
                      resource/unarchive/unarchive_test.go on lines 1106..1106
                      resource/unarchive/unarchive_test.go on lines 1107..1107
                      resource/unarchive/unarchive_test.go on lines 1108..1108
                      resource/unarchive/unarchive_test.go on lines 1302..1302
                      resource/unarchive/unarchive_test.go on lines 1303..1303
                      resource/unarchive/unarchive_test.go on lines 1305..1305
                      resource/unarchive/unarchive_test.go on lines 1306..1306

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

                      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

                              assert.True(t, strings.Contains(act[0], exp[0]) || strings.Contains(act[1], exp[0]) || strings.Contains(act[2], exp[0]) || strings.Contains(act[3], exp[0]) || strings.Contains(act[4], exp[0]))
                      Severity: Major
                      Found in resource/unarchive/unarchive_test.go and 9 other locations - About 45 mins to fix
                      resource/unarchive/unarchive_test.go on lines 1105..1105
                      resource/unarchive/unarchive_test.go on lines 1106..1106
                      resource/unarchive/unarchive_test.go on lines 1107..1107
                      resource/unarchive/unarchive_test.go on lines 1108..1108
                      resource/unarchive/unarchive_test.go on lines 1302..1302
                      resource/unarchive/unarchive_test.go on lines 1303..1303
                      resource/unarchive/unarchive_test.go on lines 1304..1304
                      resource/unarchive/unarchive_test.go on lines 1305..1305
                      resource/unarchive/unarchive_test.go on lines 1306..1306

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

                      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

                              assert.True(t, strings.Contains(act[0], exp[2]) || strings.Contains(act[1], exp[2]) || strings.Contains(act[2], exp[2]) || strings.Contains(act[3], exp[2]) || strings.Contains(act[4], exp[2]))
                      Severity: Major
                      Found in resource/unarchive/unarchive_test.go and 9 other locations - About 45 mins to fix
                      resource/unarchive/unarchive_test.go on lines 1104..1104
                      resource/unarchive/unarchive_test.go on lines 1105..1105
                      resource/unarchive/unarchive_test.go on lines 1107..1107
                      resource/unarchive/unarchive_test.go on lines 1108..1108
                      resource/unarchive/unarchive_test.go on lines 1302..1302
                      resource/unarchive/unarchive_test.go on lines 1303..1303
                      resource/unarchive/unarchive_test.go on lines 1304..1304
                      resource/unarchive/unarchive_test.go on lines 1305..1305
                      resource/unarchive/unarchive_test.go on lines 1306..1306

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

                      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

                              assert.True(t, strings.Contains(act[0], exp[1]) || strings.Contains(act[1], exp[1]) || strings.Contains(act[2], exp[1]) || strings.Contains(act[3], exp[1]) || strings.Contains(act[4], exp[1]))
                      Severity: Major
                      Found in resource/unarchive/unarchive_test.go and 9 other locations - About 45 mins to fix
                      resource/unarchive/unarchive_test.go on lines 1104..1104
                      resource/unarchive/unarchive_test.go on lines 1106..1106
                      resource/unarchive/unarchive_test.go on lines 1107..1107
                      resource/unarchive/unarchive_test.go on lines 1108..1108
                      resource/unarchive/unarchive_test.go on lines 1302..1302
                      resource/unarchive/unarchive_test.go on lines 1303..1303
                      resource/unarchive/unarchive_test.go on lines 1304..1304
                      resource/unarchive/unarchive_test.go on lines 1305..1305
                      resource/unarchive/unarchive_test.go on lines 1306..1306

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

                      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

                              assert.True(t, strings.Contains(act[0], exp[3]) || strings.Contains(act[1], exp[3]) || strings.Contains(act[2], exp[3]) || strings.Contains(act[3], exp[3]) || strings.Contains(act[4], exp[3]))
                      Severity: Major
                      Found in resource/unarchive/unarchive_test.go and 9 other locations - About 45 mins to fix
                      resource/unarchive/unarchive_test.go on lines 1104..1104
                      resource/unarchive/unarchive_test.go on lines 1105..1105
                      resource/unarchive/unarchive_test.go on lines 1106..1106
                      resource/unarchive/unarchive_test.go on lines 1108..1108
                      resource/unarchive/unarchive_test.go on lines 1302..1302
                      resource/unarchive/unarchive_test.go on lines 1303..1303
                      resource/unarchive/unarchive_test.go on lines 1304..1304
                      resource/unarchive/unarchive_test.go on lines 1305..1305
                      resource/unarchive/unarchive_test.go on lines 1306..1306

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

                      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

                              assert.True(t, strings.Contains(act[0], exp[4]) || strings.Contains(act[1], exp[4]) || strings.Contains(act[2], exp[4]) || strings.Contains(act[3], exp[4]) || strings.Contains(act[4], exp[4]))
                      Severity: Major
                      Found in resource/unarchive/unarchive_test.go and 9 other locations - About 45 mins to fix
                      resource/unarchive/unarchive_test.go on lines 1104..1104
                      resource/unarchive/unarchive_test.go on lines 1105..1105
                      resource/unarchive/unarchive_test.go on lines 1106..1106
                      resource/unarchive/unarchive_test.go on lines 1107..1107
                      resource/unarchive/unarchive_test.go on lines 1108..1108
                      resource/unarchive/unarchive_test.go on lines 1302..1302
                      resource/unarchive/unarchive_test.go on lines 1303..1303
                      resource/unarchive/unarchive_test.go on lines 1304..1304
                      resource/unarchive/unarchive_test.go on lines 1305..1305

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

                      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

                              assert.True(t, strings.Contains(act[0], exp[1]) || strings.Contains(act[1], exp[1]) || strings.Contains(act[2], exp[1]) || strings.Contains(act[3], exp[1]) || strings.Contains(act[4], exp[1]))
                      Severity: Major
                      Found in resource/unarchive/unarchive_test.go and 9 other locations - About 45 mins to fix
                      resource/unarchive/unarchive_test.go on lines 1104..1104
                      resource/unarchive/unarchive_test.go on lines 1105..1105
                      resource/unarchive/unarchive_test.go on lines 1106..1106
                      resource/unarchive/unarchive_test.go on lines 1107..1107
                      resource/unarchive/unarchive_test.go on lines 1108..1108
                      resource/unarchive/unarchive_test.go on lines 1302..1302
                      resource/unarchive/unarchive_test.go on lines 1304..1304
                      resource/unarchive/unarchive_test.go on lines 1305..1305
                      resource/unarchive/unarchive_test.go on lines 1306..1306

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

                      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

                              assert.True(t, strings.Contains(act[0], exp[3]) || strings.Contains(act[1], exp[3]) || strings.Contains(act[2], exp[3]) || strings.Contains(act[3], exp[3]) || strings.Contains(act[4], exp[3]))
                      Severity: Major
                      Found in resource/unarchive/unarchive_test.go and 9 other locations - About 45 mins to fix
                      resource/unarchive/unarchive_test.go on lines 1104..1104
                      resource/unarchive/unarchive_test.go on lines 1105..1105
                      resource/unarchive/unarchive_test.go on lines 1106..1106
                      resource/unarchive/unarchive_test.go on lines 1107..1107
                      resource/unarchive/unarchive_test.go on lines 1108..1108
                      resource/unarchive/unarchive_test.go on lines 1302..1302
                      resource/unarchive/unarchive_test.go on lines 1303..1303
                      resource/unarchive/unarchive_test.go on lines 1304..1304
                      resource/unarchive/unarchive_test.go on lines 1306..1306

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

                      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

                              assert.True(t, strings.Contains(act[0], exp[4]) || strings.Contains(act[1], exp[4]) || strings.Contains(act[2], exp[4]) || strings.Contains(act[3], exp[4]) || strings.Contains(act[4], exp[4]))
                      Severity: Major
                      Found in resource/unarchive/unarchive_test.go and 9 other locations - About 45 mins to fix
                      resource/unarchive/unarchive_test.go on lines 1104..1104
                      resource/unarchive/unarchive_test.go on lines 1105..1105
                      resource/unarchive/unarchive_test.go on lines 1106..1106
                      resource/unarchive/unarchive_test.go on lines 1107..1107
                      resource/unarchive/unarchive_test.go on lines 1302..1302
                      resource/unarchive/unarchive_test.go on lines 1303..1303
                      resource/unarchive/unarchive_test.go on lines 1304..1304
                      resource/unarchive/unarchive_test.go on lines 1305..1305
                      resource/unarchive/unarchive_test.go on lines 1306..1306

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

                      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

                              assert.True(t, strings.Contains(u.fetchContents[0], expF[2]) || strings.Contains(u.fetchContents[1], expF[2]) || strings.Contains(u.fetchContents[2], expF[2]) || strings.Contains(u.fetchContents[3], expF[2]))
                      Severity: Major
                      Found in resource/unarchive/unarchive_test.go and 3 other locations - About 40 mins to fix
                      resource/unarchive/unarchive_test.go on lines 702..702
                      resource/unarchive/unarchive_test.go on lines 703..703
                      resource/unarchive/unarchive_test.go on lines 705..705

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

                      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

                              assert.True(t, strings.Contains(u.fetchContents[0], expF[1]) || strings.Contains(u.fetchContents[1], expF[1]) || strings.Contains(u.fetchContents[2], expF[1]) || strings.Contains(u.fetchContents[3], expF[1]))
                      Severity: Major
                      Found in resource/unarchive/unarchive_test.go and 3 other locations - About 40 mins to fix
                      resource/unarchive/unarchive_test.go on lines 702..702
                      resource/unarchive/unarchive_test.go on lines 704..704
                      resource/unarchive/unarchive_test.go on lines 705..705

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

                      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

                              assert.True(t, strings.Contains(u.fetchContents[0], expF[0]) || strings.Contains(u.fetchContents[1], expF[0]) || strings.Contains(u.fetchContents[2], expF[0]) || strings.Contains(u.fetchContents[3], expF[0]))
                      Severity: Major
                      Found in resource/unarchive/unarchive_test.go and 3 other locations - About 40 mins to fix
                      resource/unarchive/unarchive_test.go on lines 703..703
                      resource/unarchive/unarchive_test.go on lines 704..704
                      resource/unarchive/unarchive_test.go on lines 705..705

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

                      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

                              assert.True(t, strings.Contains(u.fetchContents[0], expF[3]) || strings.Contains(u.fetchContents[1], expF[3]) || strings.Contains(u.fetchContents[2], expF[3]) || strings.Contains(u.fetchContents[3], expF[3]))
                      Severity: Major
                      Found in resource/unarchive/unarchive_test.go and 3 other locations - About 40 mins to fix
                      resource/unarchive/unarchive_test.go on lines 702..702
                      resource/unarchive/unarchive_test.go on lines 703..703
                      resource/unarchive/unarchive_test.go on lines 704..704

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

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

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

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

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

                      Refactorings

                      Further Reading

                      There are no issues that match your filters.

                      Category
                      Status