enclose-io/compiler

View on GitHub
lts/deps/v8/tools/mb/mb_unittest.py

Summary

Maintainability
F
3 wks
Test Coverage

File mb_unittest.py has 542 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/python
# Copyright 2016 the V8 project authors. All rights reserved.
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Severity: Major
Found in lts/deps/v8/tools/mb/mb_unittest.py - About 1 day to fix

    UnitTest has 24 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class UnitTest(unittest.TestCase):
      def fake_mbw(self, files=None, win32=False):
        mbw = FakeMBW(win32=win32)
        mbw.files.setdefault(mbw.default_config, TEST_CONFIG)
        mbw.files.setdefault(
    Severity: Minor
    Found in lts/deps/v8/tools/mb/mb_unittest.py - About 2 hrs to fix

      Function check has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        def check(self, args, mbw=None, files=None, out=None, err=None, ret=None):
      Severity: Minor
      Found in lts/deps/v8/tools/mb/mb_unittest.py - About 45 mins to fix

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

        class FakeMBW(mb.MetaBuildWrapper):
          def __init__(self, win32=False):
            super(FakeMBW, self).__init__()
        
            # Override vars for test portability.
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 5 days to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 18..92

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

        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 test_gen(self):
            mbw = self.fake_mbw()
            self.check(['gen', '-c', 'debug_goma', '//out/Default', '-g', '/goma'],
                       mbw=mbw, ret=0)
            self.assertMultiLineEqual(mbw.files['/fake_src/out/Default/args.gn'],
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 1 day to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 312..342

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

        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 test_multiple_phases(self):
            # Check that not passing a --phase to a multi-phase builder fails.
            mbw = self.check(['lookup', '-m', 'fake_master', '-b', 'fake_multi_phase'],
                             ret=1)
            self.assertIn('Must specify a build --phase', mbw.out)
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 1 day to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 581..604

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

        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 test_analyze_handles_way_too_many_results(self):
            too_many_files = ', '.join(['"//foo:foo%d"' % i for i in range(4 * 1024)])
            files = {'/tmp/in.json': '''{\
                       "files": ["foo/foo_unittest.cc"],
                       "test_targets": ["foo_unittests"],
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 1 day to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 286..310

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

        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 test_analyze(self):
            files = {'/tmp/in.json': '''{\
                       "files": ["foo/foo_unittest.cc"],
                       "test_targets": ["foo_unittests"],
                       "additional_compile_targets": ["all"]
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 7 hrs to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 213..234

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

        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 test_analyze_handles_other_toolchains(self):
            files = {'/tmp/in.json': '''{\
                       "files": ["foo/foo_unittest.cc"],
                       "test_targets": ["foo_unittests"],
                       "additional_compile_targets": ["all"]
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 7 hrs to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 259..284

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

        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 test_analyze_optimizes_compile_for_all(self):
            files = {'/tmp/in.json': '''{\
                       "files": ["foo/foo_unittest.cc"],
                       "test_targets": ["foo_unittests"],
                       "additional_compile_targets": ["all"]
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 7 hrs to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 237..257

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

        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 fake_mbw(self, files=None, win32=False):
            mbw = FakeMBW(win32=win32)
            mbw.files.setdefault(mbw.default_config, TEST_CONFIG)
            mbw.files.setdefault(
              mbw.ToAbsPath('//testing/buildbot/gn_isolate_map.pyl'),
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 6 hrs to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 180..198

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

        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 check(self, args, mbw=None, files=None, out=None, err=None, ret=None):
            if not mbw:
              mbw = self.fake_mbw(files)
        
            actual_ret = mbw.Main(args)
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 6 hrs to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 200..211

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

        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 test_isolate(self):
            files = {
              '/fake_src/out/Default/toolchain.ninja': "",
              '/fake_src/testing/buildbot/gn_isolate_map.pyl': (
                  "{'base_unittests': {"
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 5 hrs to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 483..505

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

        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 test_multiple_isolate_maps(self):
            files = {
              '/tmp/swarming_targets': 'cc_perftests\n',
              '/fake_src/testing/buildbot/gn_isolate_map.pyl': (
                  "{'cc_perftests': {"
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 5 hrs to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 415..448

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

        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 test_gen_args_file_mixins(self):
            mbw = self.fake_mbw()
            self.check(['gen', '-m', 'fake_master', '-b', 'fake_args_file',
                        '//out/Debug'], mbw=mbw, ret=0)
        
        
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 5 hrs to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 344..356

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

        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 test_gen_swarming_script(self):
            files = {
              '/tmp/swarming_targets': 'cc_perftests\n',
              '/fake_src/testing/buildbot/gn_isolate_map.pyl': (
                  "{'cc_perftests': {"
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 4 hrs to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 387..412

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

        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 test_help(self):
            orig_stdout = sys.stdout
            try:
              sys.stdout = StringIO.StringIO()
              self.assertRaises(SystemExit, self.check, ['-h'])
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 4 hrs to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 571..579

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

        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 test_gen_swarming(self):
            files = {
              '/tmp/swarming_targets': 'base_unittests\n',
              '/fake_src/testing/buildbot/gn_isolate_map.pyl': (
                  "{'base_unittests': {"
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 4 hrs to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 363..385

        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

        class FakeFile(object):
          def __init__(self, files):
            self.name = '/tmp/file'
            self.buf = ''
            self.files = files
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 3 hrs to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 95..105

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

        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 test_duplicate_isolate_maps(self):
            files = {
              '/tmp/swarming_targets': 'cc_perftests\n',
              '/fake_src/testing/buildbot/gn_isolate_map.pyl': (
                  "{'cc_perftests': {"
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 3 hrs to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 451..481

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

        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 test_gen_fails(self):
            mbw = self.fake_mbw()
            mbw.Call = lambda cmd, env=None, buffer_output=True: (1, '', '')
            self.check(['gen', '-c', 'debug_goma', '//out/Default'], mbw=mbw, ret=1)
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 2 hrs to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 358..361

        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 test_buildbucket(self):
            mbw = self.fake_mbw()
            mbw.files[mbw.default_config] = TRYSERVER_CONFIG
            self.check(['gerrit-buildbucket-config'], mbw=mbw,
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 2 hrs to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 623..626

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

        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 test_recursive_lookup(self):
            files = {
                '/fake_src/build/args/fake.gn': (
                  'enable_doom_melon = true\n'
                  'enable_antidoom_banana = true\n'
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 1 hr to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 606..614

        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 test_run(self):
            files = {
              '/fake_src/testing/buildbot/gn_isolate_map.pyl': (
                  "{'base_unittests': {"
                  "  'label': '//base:base_unittests',"
        Severity: Major
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 1 hr to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 508..522

        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

          def test_validate(self):
            mbw = self.fake_mbw()
            self.check(['validate'], mbw=mbw, ret=0)
        Severity: Minor
        Found in lts/deps/v8/tools/mb/mb_unittest.py and 1 other location - About 35 mins to fix
        current/deps/v8/tools/mb/mb_unittest.py on lines 619..621

        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