hackedteam/vector-edk

View on GitHub

Showing 3,985 of 13,510 total issues

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

        if len (self.__Token) <= 4:
            while self.__IsToken(","):
                if not self.__GetNextHexNumber():
                    raise Warning("Invalid Hex number", self.FileName, self.CurrentLineNumber)
                if len(self.__Token) > 4:
Severity: Major
Found in BaseTools/Source/Python/GenFds/FdfParser.py and 1 other location - About 5 hrs to fix
BaseTools/Source/Python/GenFds/FdfParser.py on lines 1994..2001

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

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 SetLogLevel(self, Option):
        if Option.verbose != None:
            EdkLogger.SetLevel(EdkLogger.VERBOSE)
        elif Option.quiet != None:
            EdkLogger.SetLevel(EdkLogger.QUIET)
Severity: Major
Found in BaseTools/Source/Python/Ecc/Ecc.py and 1 other location - About 5 hrs to fix
BaseTools/Source/Python/Eot/Eot.py on lines 580..588

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

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

vector-uefi/fd/efi/StdLib/lib/python.27/lib2to3/fixes/fix_repr.py on lines 0..23

Duplicated Code

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

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

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

Tuning

This issue has a mass of 96.

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

vector-uefi/fd/efi/StdLib/lib/python.27/lib2to3/fixes/fix_xreadlines.py on lines 0..25

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

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

        if not self.__IsToken("[CAPSULE.", True):
            FileLineTuple = GetRealFileLine(self.FileName, self.CurrentLineNumber)
            print 'Parsing String: %s in File %s, At line: %d, Offset Within Line: %d' \
                    % (self.Profile.FileLinesList[self.CurrentLineNumber - 1][self.CurrentOffsetWithinLine :], FileLineTuple[0], FileLineTuple[1], self.CurrentOffsetWithinLine)
            raise Warning("expected [Capsule.] At Line ", self.FileName, self.CurrentLineNumber)        
Severity: Major
Found in BaseTools/Source/Python/Common/FdfParserLite.py and 4 other locations - About 5 hrs to fix
BaseTools/Source/Python/Common/FdfParserLite.py on lines 1267..1271
BaseTools/Source/Python/Common/FdfParserLite.py on lines 1835..1839
BaseTools/Source/Python/Common/FdfParserLite.py on lines 2762..2766
BaseTools/Source/Python/Common/FdfParserLite.py on lines 3349..3353

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

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 len (self.__Token) <= 4:
                while self.__IsToken(","):
                    if not self.__GetNextHexNumber():
                        raise Warning("Invalid Hex number", self.FileName, self.CurrentLineNumber)
                    if len(self.__Token) > 4:
Severity: Major
Found in BaseTools/Source/Python/GenFds/FdfParser.py and 1 other location - About 5 hrs to fix
BaseTools/Source/Python/GenFds/FdfParser.py on lines 1954..1961

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

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

            for ElementRegion in FdObj.RegionList:
                    if ElementRegion.RegionType == 'FV':
                        for ElementRegionData in ElementRegion.RegionDataList:
                            if ElementRegionData != None and ElementRegionData.upper() == FvObj.UiFvName:
                                if FvObj.BlockSizeList != []:
Severity: Major
Found in BaseTools/Source/Python/GenFds/GenFds.py and 1 other location - About 5 hrs to fix
BaseTools/Source/Python/GenFds/GenFds.py on lines 407..415

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

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

            for ElementFd in GenFdsGlobalVariable.FdfParser.Profile.FdDict.values():
                for ElementRegion in ElementFd.RegionList:
                    if ElementRegion.RegionType == 'FV':
                        for ElementRegionData in ElementRegion.RegionDataList:
                            if ElementRegionData != None and ElementRegionData.upper() == FvObj.UiFvName:
Severity: Major
Found in BaseTools/Source/Python/GenFds/GenFds.py and 1 other location - About 5 hrs to fix
BaseTools/Source/Python/GenFds/GenFds.py on lines 420..427

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

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

    def testNormalCase4(self):
        ObjectList = []
        
        CName = 'Guid1'
        FFE = 'FFE1'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 589..607
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 609..627
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 689..707
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 709..727
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 729..747
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 749..767

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

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

    def testNormalCase9(self):
        ObjectList = []
        
        CName = 'Guid1'
        FFE = 'FFE1'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 589..607
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 609..627
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 629..647
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 689..707
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 709..727
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 749..767

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

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

    def testNormalCase2(self):
        ObjectList = []
        
        CName = 'Guid1'
        FFE = 'FFE1'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 609..627
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 629..647
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 689..707
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 709..727
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 729..747
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 749..767

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

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

    def testNormalCase3(self):
        ObjectList = []
        
        CName = 'Guid1'
        FFE = 'FFE1'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 589..607
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 629..647
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 689..707
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 709..727
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 729..747
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 749..767

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

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

    def testNormalCase7(self):
        ObjectList = []
        
        CName = 'Guid1'
        FFE = 'FFE1'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 589..607
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 609..627
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 629..647
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 709..727
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 729..747
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 749..767

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

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

    def testNormalCase8(self):
        ObjectList = []
        
        CName = 'Guid1'
        FFE = 'FFE1'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 589..607
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 609..627
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 629..647
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 689..707
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 729..747
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 749..767

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

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

    def testNormalCaseA(self):
        ObjectList = []
        
        CName = 'Guid1'
        FFE = 'FFE1'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 589..607
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 609..627
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 629..647
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 689..707
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 709..727
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 729..747

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

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

AppPkg/Applications/Python/Python-2.7.2/Lib/xml/dom/NodeFilter.py on lines 0..27

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

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

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

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

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

Refactorings

Further Reading

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

    def testNormalCase5(self):
        ObjectList = []
        
        CName = 'Guid1'
        FFE = 'FFE1'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 669..687
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 769..787
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 789..807

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

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

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

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

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

Refactorings

Further Reading

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

    def testNormalCaseB(self):
        ObjectList = []
        
        CName = 'Guid1'
        FFE = 'FFE1'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 649..667
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 669..687
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 789..807

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

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

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

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

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

Refactorings

Further Reading

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

    def testNormalCase6(self):
        ObjectList = []
        
        CName = 'Guid1'
        FFE = 'FFE1'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 649..667
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 769..787
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 789..807

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

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

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

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

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

Refactorings

Further Reading

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

    def testNormalCaseC(self):
        ObjectList = []
        
        CName = 'Guid1'
        FFE = 'FFE1'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 649..667
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 669..687
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 769..787

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

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

Severity
Category
Status
Source
Language