enclose-io/compiler

View on GitHub
lts/deps/v8/tools/testrunner/testproc/progress.py

Summary

Maintainability
F
2 wks
Test Coverage

File progress.py has 350 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# for py2/py3 compatibility
Severity: Minor
Found in lts/deps/v8/tools/testrunner/testproc/progress.py - About 4 hrs to fix

    Function finished has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

      def finished(self):
        crashed = 0
        print()
        for test, result in self._failed:
          print_failure_header(test)
    Severity: Minor
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function _on_result_for has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

      def _on_result_for(self, test, result):
        # TODO(majeski): Support for dummy/grouped results
        if result.has_unexpected_output:
          self._failed += 1
        else:
    Severity: Minor
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function _on_result_for has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

      def _on_result_for(self, test, result):
        # TODO(majeski): Support for dummy/grouped results
        fail_text = ""
        output = result.output
        if result.has_unexpected_output:
    Severity: Minor
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py - About 55 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function _on_result_for has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

      def _on_result_for(self, test, result):
        super(DotsProgressIndicator, self)._on_result_for(test, result)
        # TODO(majeski): Support for dummy/grouped results
        self._count += 1
        if self._count > 1 and self._count % 50 == 1:
    Severity: Minor
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py - About 45 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function _print_processes_linux has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

      def _print_processes_linux(self):
        if platform.system() == 'Linux':
          try:
            cmd = 'ps -aux | grep "%s"' % OUT_DIR
            output = subprocess.check_output(cmd, shell=True)
    Severity: Minor
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py - About 25 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function _message has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

      def _message(self, test, result):
        # TODO(majeski): Support for dummy/grouped results
        if result.has_unexpected_output:
          if result.output.HasCrashed():
            outcome = 'CRASH'
    Severity: Minor
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py - About 25 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

    class VerboseProgressIndicator(SimpleProgressIndicator):
      def __init__(self):
        super(VerboseProgressIndicator, self).__init__()
        self._last_printed_time = time.time()
    
    
    Severity: Major
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py and 1 other location - About 3 days to fix
    current/deps/v8/tools/testrunner/testproc/progress.py on lines 116..169

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

    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

    class SimpleProgressIndicator(ProgressIndicator):
      def __init__(self):
        super(SimpleProgressIndicator, self).__init__()
        self._requirement = base.DROP_PASS_OUTPUT
    
    
    Severity: Major
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py and 1 other location - About 3 days to fix
    current/deps/v8/tools/testrunner/testproc/progress.py on lines 73..113

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

    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

    class JUnitTestProgressIndicator(ProgressIndicator):
      def __init__(self, junitout, junittestsuite):
        super(JUnitTestProgressIndicator, self).__init__()
        self._requirement = base.DROP_PASS_STDOUT
    
    
    Severity: Major
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py and 1 other location - About 2 days to fix
    current/deps/v8/tools/testrunner/testproc/progress.py on lines 321..357

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

    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

      def _on_result_for(self, test, result):
        # TODO(majeski): Support for dummy/grouped results
        if result.has_unexpected_output:
          self._failed += 1
        else:
    Severity: Major
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py and 1 other location - About 2 days to fix
    current/deps/v8/tools/testrunner/testproc/progress.py on lines 231..255

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

    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

    class DotsProgressIndicator(SimpleProgressIndicator):
      def __init__(self):
        super(DotsProgressIndicator, self).__init__()
        self._count = 0
    
    
    Severity: Major
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py and 1 other location - About 1 day to fix
    current/deps/v8/tools/testrunner/testproc/progress.py on lines 190..213

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

    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

    class ResultsTracker(base.TestProcObserver):
      """Tracks number of results and stops to run tests if max_failures reached."""
      def __init__(self, max_failures):
        super(ResultsTracker, self).__init__()
        self._requirement = base.DROP_OUTPUT
    Severity: Major
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py and 1 other location - About 1 day to fix
    current/deps/v8/tools/testrunner/testproc/progress.py on lines 37..58

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

    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

    class CIProgressIndicator(VerboseProgressIndicator):
      def _on_result_for(self, test, result):
        super(VerboseProgressIndicator, self)._on_result_for(test, result)
        if self.options.ci_test_completion:
          with open(self.options.ci_test_completion, "a") as f:
    Severity: Major
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py and 1 other location - About 1 day to fix
    current/deps/v8/tools/testrunner/testproc/progress.py on lines 172..187

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

    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

    class MonochromeProgressIndicator(CompactProgressIndicator):
      def __init__(self):
        templates = {
          'status_line': ("[%(mins)02i:%(secs)02i|%%%(progress) 4d|"
                          "+%(passed) 4d|-%(failed) 4d]: %(test)s"),
    Severity: Major
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py and 1 other location - About 3 hrs to fix
    current/deps/v8/tools/testrunner/testproc/progress.py on lines 307..318

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

    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

      def __init__(self, templates):
        super(CompactProgressIndicator, self).__init__()
        self._requirement = base.DROP_PASS_OUTPUT
    
        self._templates = templates
    Severity: Major
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py and 1 other location - About 3 hrs to fix
    current/deps/v8/tools/testrunner/testproc/progress.py on lines 217..226

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

    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

    class ColorProgressIndicator(CompactProgressIndicator):
      def __init__(self):
        templates = {
          'status_line': ("[%(mins)02i:%(secs)02i|"
                          "\033[34m%%%(progress) 4d\033[0m|"
    Severity: Major
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py and 1 other location - About 2 hrs to fix
    current/deps/v8/tools/testrunner/testproc/progress.py on lines 291..304

    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

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

    class ProgressIndicator(base.TestProcObserver):
      def __init__(self):
        super(base.TestProcObserver, self).__init__()
        self.options = None
    
    
    Severity: Major
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py and 1 other location - About 2 hrs to fix
    current/deps/v8/tools/testrunner/testproc/progress.py on lines 61..70

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

    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

    def print_failure_header(test):
      if test.output_proc.negative:
        negative_marker = '[negative] '
      else:
        negative_marker = ''
    Severity: Major
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py and 1 other location - About 1 hr to fix
    current/deps/v8/tools/testrunner/testproc/progress.py on lines 26..33

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

        if self._total:
          progress = (self._passed + self._failed) * 100 // self._total
        else:
          progress = 0
    Severity: Major
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py and 1 other location - About 1 hr to fix
    current/deps/v8/tools/testrunner/testproc/progress.py on lines 264..267

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

    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

      def _on_result_for(self, test, result):
        if result.is_rerun:
          self.process_results(test, result.results)
        else:
          self.process_results(test, [result])
    Severity: Major
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py and 1 other location - About 1 hr to fix
    current/deps/v8/tools/testrunner/testproc/progress.py on lines 382..386

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

    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

    OUT_DIR = os.path.abspath(
        os.path.join(os.path.dirname(__file__), '..', '..', '..', 'out'))
    Severity: Minor
    Found in lts/deps/v8/tools/testrunner/testproc/progress.py and 1 other location - About 35 mins to fix
    current/deps/v8/tools/testrunner/testproc/progress.py on lines 22..23

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

    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