hackedteam/vector-edk

View on GitHub
BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py

Summary

Maintainability
F
2 wks
Test Coverage

File CommentParsingUnitTest.py has 536 lines of code (exceeds 250 allowed). Consider refactoring.
Open

## @file
# This file contain unit test for CommentParsing
#
# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
#
Severity: Major
Found in BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py - About 1 day to fix

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

        def testNormalCase3(self):
            TestCommentLines = \
            '''## hello world
            # second line
            # @ValidRange LT 1 AND GT 2
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 607..629

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

    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 testNormalCase4(self):
            TestCommentLines = \
            '''## hello world
            # second line
            # @Expression LT 1 AND GT 2
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 580..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 161.

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

        def testNormalCase8(self):
            TestCommentLines = \
            '''
            ## @file
            # Abstact
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 39..76
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 81..117
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 124..162
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 167..204
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 209..250
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 255..298
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 303..345

    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

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

        def testNormalCase4(self):
            TestCommentLines = \
            '''
            ## @file
            # Abstract
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 39..76
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 81..117
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 124..162
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 209..250
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 255..298
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 303..345
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 350..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 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

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

        def testNormalCase1(self):
            TestCommentLines1 = \
            '''# License1
            # License2
            #
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 81..117
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 124..162
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 167..204
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 209..250
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 255..298
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 303..345
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 350..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 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

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

        def testNormalCase3(self):
            TestCommentLines3 = \
            ''' # License1
            # License2
            #
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 39..76
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 81..117
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 167..204
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 209..250
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 255..298
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 303..345
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 350..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 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

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

        def testNormalCase7(self):
            TestCommentLines = \
            '''
            ## @file
            #
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 39..76
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 81..117
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 124..162
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 167..204
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 209..250
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 255..298
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 350..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 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

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

        def testNormalCase2(self):
            TestCommentLines2 = \
            ''' # License1
            # License2
            #
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 39..76
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 124..162
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 167..204
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 209..250
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 255..298
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 303..345
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 350..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 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

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

        def testNormalCase5(self):
            TestCommentLines = \
            '''
            ## @file
            # Abstract
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 39..76
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 81..117
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 124..162
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 167..204
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 255..298
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 303..345
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 350..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 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

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

        def testNormalCase6(self):
            TestCommentLines = \
            '''
            ## @file
            # Abstract
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 39..76
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 81..117
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 124..162
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 167..204
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 209..250
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 303..345
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 350..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 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

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

        def testNormalCase1(self):
            TestCommentLines = \
            '''# hello world'''
         
            CommentList = GetSplitValueList(TestCommentLines, "\n")
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 496..512

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

    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 testNormalCase3(self):
            TestCommentLines = \
            '''## hello world
            This is not comment line'''
         
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 456..470

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

    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 testErrorCase1(self):
            TestCommentLines = \
            '''## hello world
            # second line
            # @ValidList 1, 2, 3        
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 822..835

    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

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

        def testErrorCase2(self):
            TestCommentLines = \
            '''## BASE INVALID_MODULE_TYPE #hello world'''
         
            CommentList = GetSplitValueList(TestCommentLines, "\n")
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 678..695

    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

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

        def testErrorCase2(self):
            TestCommentLines = \
            '''
            ## @file
            # Abstract
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 390..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 70.

    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 testErrorCase1(self):
            TestCommentLines = \
            '''
            ## @file
            # Abstract
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 417..441

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

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

        def testCase8(self):
            Line = ' Copyright (c) line'
            Result = _IsCopyrightLine(Line)
            self.failIf(not Result)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py and 5 other locations - About 35 mins to fix
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 852..855
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 860..863
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 876..879
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 884..887
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 900..903

    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

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

        def testCase5(self):
            Line = 'this is Copyright         (line'
            Result = _IsCopyrightLine(Line)
            self.failIf(not Result)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py and 5 other locations - About 35 mins to fix
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 852..855
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 860..863
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 876..879
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 900..903
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 908..911

    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

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

        def testCase7(self):
            Line = 'Copyright (c) line'
            Result = _IsCopyrightLine(Line)
            self.failIf(not Result)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py and 5 other locations - About 35 mins to fix
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 852..855
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 860..863
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 876..879
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 884..887
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 908..911

    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

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

        def testCase1(self):
            Line = 'this is a copyright ( line'
            Result = _IsCopyrightLine(Line)
            self.failIf(not Result)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py and 5 other locations - About 35 mins to fix
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 860..863
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 876..879
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 884..887
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 900..903
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 908..911

    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

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

        def testCase2(self):
            Line = 'this is a Copyright ( line'
            Result = _IsCopyrightLine(Line)
            self.failIf(not Result)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py and 5 other locations - About 35 mins to fix
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 852..855
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 876..879
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 884..887
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 900..903
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 908..911

    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

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

        def testCase4(self):
            Line = 'this is Copyright( line'
            Result = _IsCopyrightLine(Line)
            self.failIf(not Result)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py and 5 other locations - About 35 mins to fix
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 852..855
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 860..863
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 884..887
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 900..903
    BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py on lines 908..911

    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