enclose-io/compiler

View on GitHub
lts/deps/v8/tools/testrunner/base_runner.py

Summary

Maintainability
F
3 wks
Test Coverage

File base_runner.py has 667 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2017 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: Major
Found in lts/deps/v8/tools/testrunner/base_runner.py - About 1 day to fix

    BaseTestRunner has 33 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class BaseTestRunner(object):
      def __init__(self, basedir=None):
        self.basedir = basedir or BASE_DIR
        self.outdir = None
        self.build_config = None
    Severity: Minor
    Found in lts/deps/v8/tools/testrunner/base_runner.py - About 4 hrs to fix

      Function _process_default_options has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

        def _process_default_options(self, options):
          # We don't use the mode for more path-magic.
          # Therefore transform the buildbot mode here to fix build_config value.
          if options.mode:
            options.mode = self._buildbot_to_v8_mode(options.mode)
      Severity: Minor
      Found in lts/deps/v8/tools/testrunner/base_runner.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 __str__ has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

        def __str__(self):
          detected_options = []
      
          if self.asan:
            detected_options.append('asan')
      Severity: Minor
      Found in lts/deps/v8/tools/testrunner/base_runner.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 _add_parser_default_options has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def _add_parser_default_options(self, parser):
          parser.add_option("--gn", help="Scan out.gn for the last built"
                            " configuration",
                            default=False, action="store_true")
          parser.add_option("--outdir", help="Base directory with compile output",
      Severity: Minor
      Found in lts/deps/v8/tools/testrunner/base_runner.py - About 1 hr to fix

        Function _setup_env has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

          def _setup_env(self):
            # Use the v8 root as cwd as some test cases use "load" with relative paths.
            os.chdir(self.basedir)
        
            # Many tests assume an English interface.
        Severity: Minor
        Found in lts/deps/v8/tools/testrunner/base_runner.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 _get_shard_info has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

          def _get_shard_info(self, options):
            """
            Returns pair:
              (id of the current shard [1; number of shards], number of shards)
            """
        Severity: Minor
        Found in lts/deps/v8/tools/testrunner/base_runner.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 execute has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

          def execute(self, sys_args=None):
            if sys_args is None:  # pragma: no cover
              sys_args = sys.argv[1:]
            try:
              parser = self._create_parser()
        Severity: Minor
        Found in lts/deps/v8/tools/testrunner/base_runner.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 _load_build_config has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

          def _load_build_config(self, options):
            for outdir in self._possible_outdirs(options):
              try:
                self.build_config = self._do_load_build_config(outdir, options.verbose)
              except TestRunnerError:
        Severity: Minor
        Found in lts/deps/v8/tools/testrunner/base_runner.py - About 35 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 _possible_outdirs has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

          def _possible_outdirs(self, options):
            def outdirs():
              if options.gn:
                yield self._get_gn_outdir()
                return
        Severity: Minor
        Found in lts/deps/v8/tools/testrunner/base_runner.py - About 35 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 _get_gn_outdir has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

          def _get_gn_outdir(self):
            gn_out_dir = os.path.join(self.basedir, DEFAULT_OUT_GN)
            latest_timestamp = -1
            latest_config = None
            for gn_config in os.listdir(gn_out_dir):
        Severity: Minor
        Found in lts/deps/v8/tools/testrunner/base_runner.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 _create_progress_indicators has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

          def _create_progress_indicators(self, test_count, options):
            procs = [PROGRESS_INDICATORS[options.progress]()]
            if options.junitout:
              procs.append(progress.JUnitTestProgressIndicator(options.junitout,
                                                               options.junittestsuite))
        Severity: Minor
        Found in lts/deps/v8/tools/testrunner/base_runner.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

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

          def _process_default_options(self, options):
            # We don't use the mode for more path-magic.
            # Therefore transform the buildbot mode here to fix build_config value.
            if options.mode:
              options.mode = self._buildbot_to_v8_mode(options.mode)
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 2 days to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 492..534

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

        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 execute(self, sys_args=None):
            if sys_args is None:  # pragma: no cover
              sys_args = sys.argv[1:]
            try:
              parser = self._create_parser()
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 2 days to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 257..298

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

        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 _setup_env(self):
            # Use the v8 root as cwd as some test cases use "load" with relative paths.
            os.chdir(self.basedir)
        
            # Many tests assume an English interface.
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 2 days to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 548..602

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

        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 _get_shard_info(self, options):
            """
            Returns pair:
              (id of the current shard [1; number of shards], number of shards)
            """
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 1 day to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 764..799

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

        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 _load_testsuite_generators(self, args, options):
            names = self._args_to_suite_names(args, options.test_root)
            test_config = self._create_test_config(options)
            variables = self._get_statusfile_variables(options)
        
        
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 1 day to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 641..659

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

        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 _get_gn_outdir(self):
            gn_out_dir = os.path.join(self.basedir, DEFAULT_OUT_GN)
            latest_timestamp = -1
            latest_config = None
            for gn_config in os.listdir(gn_out_dir):
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 1 day to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 456..469

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

        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 _load_build_config(self, options):
            for outdir in self._possible_outdirs(options):
              try:
                self.build_config = self._do_load_build_config(outdir, options.verbose)
              except TestRunnerError:
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 1 day to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 410..431

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

        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 _do_load_build_config(self, outdir, verbose=False):
            build_config_path = os.path.join(outdir, "v8_build_config.json")
            if not os.path.exists(build_config_path):
              if verbose:
                print("Didn't find build config: %s" % build_config_path)
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 1 day to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 471..490

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

        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 _possible_outdirs(self, options):
            def outdirs():
              if options.gn:
                yield self._get_gn_outdir()
                return
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 1 day to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 438..454

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

        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 _timeout_scalefactor(self, options):
            """Increases timeout for slow build configurations."""
            factor = self.mode_options.timeout_scalefactor
            if self.build_config.arch in SLOW_ARCHS:
              factor *= 4
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 6 hrs to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 732..746

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

        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

        MODES = {
          "debug": ModeConfig(
            flags=DEBUG_FLAGS,
            timeout_scalefactor=4,
            status_mode="debug",
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 6 hrs to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 128..158

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

        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 _prepare_procs(self, procs):
            procs = filter(None, procs)
            for i in range(0, len(procs) - 1):
              procs[i].connect_to(procs[i + 1])
            procs[0].setup()
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 4 hrs to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 752..756

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

        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 _parse_args(self, parser, sys_args):
            options, args = parser.parse_args(sys_args)
        
            if any(map(lambda v: v and ',' in v,
                        [options.arch, options.mode])):  # pragma: no cover
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 4 hrs to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 400..408

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

        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 _args_to_suite_names(self, args, test_root):
            # Use default tests if no test configuration was provided at the cmd line.
            all_names = set(utils.GetSuitePaths(test_root))
            args_names = OrderedDict([(arg.split('/')[0], None) for arg in args]) # set
            return [name for name in args_names if name in all_names]
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 4 hrs to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 632..636

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

        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 _create_parser(self):
            parser = optparse.OptionParser()
            parser.usage = '%prog [options] [tests]'
            parser.description = """TESTS: %s""" % (TEST_MAP["default"])
            self._add_parser_default_options(parser)
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 3 hrs to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 300..306

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 62.

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

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

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

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

        Refactorings

        Further Reading

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

          def _parse_test_args(self, args):
            if not args:
              args = self._get_default_suite_names()
        
            # Expand arguments with grouped tests. The args should reflect the list
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 2 hrs to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 621..630

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

        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, basedir=None):
            self.basedir = basedir or BASE_DIR
            self.outdir = None
            self.build_config = None
            self.mode_name = None
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 2 hrs to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 244..250

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 56.

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

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

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

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

        Refactorings

        Further Reading

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

          def _get_external_symbolizer_option(self):
            external_symbolizer_path = os.path.join(
                self.basedir,
                'third_party',
                'llvm-build',
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 2 hrs to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 605..619

        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 _create_shard_proc(self, options):
            myid, count = self._get_shard_info(options)
            if count == 1:
              return None
            return ShardProc(myid - 1, count)
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 1 hr to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 758..762

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

        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.arch in ['mips', 'mipsel', 'mips64', 'mips64el']:
              self.mips_arch_variant = build_config['mips_arch_variant']
              self.mips_use_msa = build_config['mips_use_msa']
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 1 hr to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 203..205

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

        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 ModeConfig(object):
          def __init__(self, flags, timeout_scalefactor, status_mode, execution_mode):
            self.flags = flags
            self.timeout_scalefactor = timeout_scalefactor
            self.status_mode = status_mode
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 1 hr to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 118..123

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

        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

            simd_mips = (
              self.build_config.arch in ['mipsel', 'mips', 'mips64', 'mips64el'] and
              self.build_config.mips_arch_variant == "r6" and
              self.build_config.mips_use_msa)
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 1 hr to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 667..670

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

        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 _buildbot_to_v8_mode(self, config):
            """Convert buildbot build configs to configs understood by the v8 runner.
        
            V8 configs are always lower case and without the additional _x64 suffix
            for 64 bit builds on windows with ninja.
        Severity: Major
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 1 hr to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 536..543

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

        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 build_config['v8_target_cpu'] == 'x86':
              self.arch = 'ia32'
            else:
              self.arch = build_config['v8_target_cpu']
        Severity: Minor
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 55 mins to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 180..183

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

        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

        sys.path.insert(
          0,
          os.path.dirname(
            os.path.dirname(os.path.abspath(__file__))))
        Severity: Minor
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 50 mins to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 21..24

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

        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 _create_rerun_proc(self, options):
            if not options.rerun_failures_count:
              return None
            return RerunProc(options.rerun_failures_count,
                             options.rerun_failures_max)
        Severity: Minor
        Found in lts/deps/v8/tools/testrunner/base_runner.py and 1 other location - About 30 mins to fix
        current/deps/v8/tools/testrunner/base_runner.py on lines 834..838

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

        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