hackedteam/vector-edk

View on GitHub

Showing 3,985 of 13,510 total issues

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

    def testNormalCase5(self):
        ObjectList = []
        SupArchList = ['X64']
        Type = 'Foo'
        Usage = 'UNDEFINED'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1122..1141
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1164..1183
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1185..1204
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1227..1243
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1245..1265
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1267..1289
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1291..1311
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1313..1332
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1334..1353
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1355..1375

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

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

    def testNormalCase4(self):
        ObjectList = []
        SupArchList = ['X64']
        Type = 'Foo'
        Usage = 'UNDEFINED'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1122..1141
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1164..1183
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1206..1225
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1227..1243
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1245..1265
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1267..1289
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1291..1311
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1313..1332
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1334..1353
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1355..1375

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

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

    def testNormalCase7(self):
        ObjectList = []
        SupArchList = ['X64']
        Type = 'Foo'
        Usage = 'UNDEFINED'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1122..1141
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1164..1183
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1185..1204
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1206..1225
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1227..1243
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1267..1289
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1291..1311
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1313..1332
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1334..1353
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1355..1375

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

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

    def testNormalCase12(self):
        ObjectList = []
        SupArchList = ['X64']
        Type = 'Foo'
        Usage = 'UNDEFINED'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1122..1141
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1164..1183
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1185..1204
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1206..1225
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1227..1243
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1245..1265
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1267..1289
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1291..1311
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1313..1332
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1334..1353

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

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

    def testNormalCase6(self):
        ObjectList = []
        SupArchList = ['X64']
        Type = 'Foo'
        Usage = 'UNDEFINED'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1122..1141
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1164..1183
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1185..1204
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1206..1225
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1245..1265
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1267..1289
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1291..1311
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1313..1332
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1334..1353
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1355..1375

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

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

    def testNormalCase1(self):
        ObjectList = []
        SupArchList = ['X64']
        Type = 'Foo'
        Usage = 'UNDEFINED'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1164..1183
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1185..1204
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1206..1225
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1227..1243
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1245..1265
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1267..1289
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1291..1311
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1313..1332
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1334..1353
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1355..1375

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

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

    def testNormalCase11(self):
        ObjectList = []
        SupArchList = ['X64']
        Type = 'Foo'
        Usage = 'UNDEFINED'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1122..1141
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1164..1183
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1185..1204
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1206..1225
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1227..1243
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1245..1265
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1267..1289
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1291..1311
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1313..1332
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1355..1375

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

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

    def testNormalCase8(self):
        ObjectList = []
        SupArchList = ['X64']
        Type = 'Foo'
        Usage = 'UNDEFINED'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1122..1141
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1164..1183
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1185..1204
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1206..1225
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1227..1243
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1245..1265
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1291..1311
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1313..1332
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1334..1353
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1355..1375

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

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

    def testNormalCase9(self):
        ObjectList = []
        SupArchList = ['X64']
        Type = 'Foo'
        Usage = 'UNDEFINED'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1122..1141
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1164..1183
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1185..1204
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1206..1225
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1227..1243
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1245..1265
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1267..1289
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1313..1332
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1334..1353
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1355..1375

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

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

    def testNormalCase10(self):
        ObjectList = []
        SupArchList = ['X64']
        Type = 'Foo'
        Usage = 'UNDEFINED'
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1122..1141
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1164..1183
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1185..1204
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1206..1225
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1227..1243
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1245..1265
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1267..1289
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1291..1311
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1334..1353
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py on lines 1355..1375

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

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

        elif Size == 8:
            if IntValue < 0:
                EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID, 
                                "PCD can't be set to negative value %d for PCD %s in UINT32 datum type(File: %s Line: %s)." % (IntValue, self.PcdCName, self.FileName, self.Lineno))
            elif IntValue >= 0x10000000000000000:
Severity: Major
Found in BaseTools/Source/Python/BPDG/GenVpd.py and 3 other locations - About 4 hrs to fix
BaseTools/Source/Python/BPDG/GenVpd.py on lines 126..132
BaseTools/Source/Python/BPDG/GenVpd.py on lines 133..139
BaseTools/Source/Python/BPDG/GenVpd.py on lines 140..146

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

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

        elif Size == 4:
            if IntValue < 0:
                EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID, 
                                "PCD can't be set to negative value %d for PCD %s in UINT32 datum type(File: %s Line: %s)." % (IntValue, self.PcdCName, self.FileName, self.Lineno))
            elif IntValue >= 0x100000000:
Severity: Major
Found in BaseTools/Source/Python/BPDG/GenVpd.py and 3 other locations - About 4 hrs to fix
BaseTools/Source/Python/BPDG/GenVpd.py on lines 126..132
BaseTools/Source/Python/BPDG/GenVpd.py on lines 133..139
BaseTools/Source/Python/BPDG/GenVpd.py on lines 147..153

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

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

        elif Size == 2:
            if IntValue < 0:
                EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID, 
                                "PCD can't be set to negative value %d for PCD %s in UINT16 datum type(File: %s Line: %s)." % (IntValue, self.PcdCName, self.FileName, self.Lineno))
            elif IntValue >= 0x10000:
Severity: Major
Found in BaseTools/Source/Python/BPDG/GenVpd.py and 3 other locations - About 4 hrs to fix
BaseTools/Source/Python/BPDG/GenVpd.py on lines 126..132
BaseTools/Source/Python/BPDG/GenVpd.py on lines 140..146
BaseTools/Source/Python/BPDG/GenVpd.py on lines 147..153

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

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 not self.__Token.startswith("0x") or len(self.__Token) < 3 or len(self.__Token) > 4 or \
                not self.__HexDigit(self.__Token[2]) or not self.__HexDigit(self.__Token[-1]):
Severity: Major
Found in BaseTools/Source/Python/Common/FdfParserLite.py and 1 other location - About 4 hrs to fix
BaseTools/Source/Python/GenFds/FdfParser.py on lines 3947..3948

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

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 not self.__Token.startswith("0x") or len(self.__Token) < 3 or len(self.__Token) > 4 or \
                not self.__HexDigit(self.__Token[2]) or not self.__HexDigit(self.__Token[-1]):
Severity: Major
Found in BaseTools/Source/Python/GenFds/FdfParser.py and 1 other location - About 4 hrs to fix
BaseTools/Source/Python/Common/FdfParserLite.py on lines 3448..3449

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

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

        if Size == 1:            
            if IntValue < 0:
                EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID, 
                                "PCD can't be set to negative value %d for PCD %s in UINT8 datum type(File: %s Line: %s)." % (IntValue, self.PcdCName, self.FileName, self.Lineno))
            elif IntValue >= 0x100:
Severity: Major
Found in BaseTools/Source/Python/BPDG/GenVpd.py and 3 other locations - About 4 hrs to fix
BaseTools/Source/Python/BPDG/GenVpd.py on lines 133..139
BaseTools/Source/Python/BPDG/GenVpd.py on lines 140..146
BaseTools/Source/Python/BPDG/GenVpd.py on lines 147..153

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

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

            if ValueList[0] == DT.BINARY_FILE_TYPE_UNI_UI or \
               ValueList[0] == DT.BINARY_FILE_TYPE_SEC_UI or \
               ValueList[0] == DT.BINARY_FILE_TYPE_UI:
                if len(ValueList) == 2:
                    TokenList = GetSplitValueList(ValueList[1], 
BaseTools/Source/Python/UPT/Parser/InfBinarySectionParser.py on lines 165..178
BaseTools/Source/Python/UPT/Parser/InfBinarySectionParser.py on lines 165..190

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

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

            elif ValueList[0] == DT.BINARY_FILE_TYPE_UNI_VER or \
               ValueList[0] == DT.BINARY_FILE_TYPE_SEC_VER or \
               ValueList[0] == DT.BINARY_FILE_TYPE_VER:
                if len(ValueList) == 2:
                    TokenList = GetSplitValueList(ValueList[1], 
BaseTools/Source/Python/UPT/Parser/InfBinarySectionParser.py on lines 148..161
BaseTools/Source/Python/UPT/Parser/InfBinarySectionParser.py on lines 165..190

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

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

            if IsValidPath(Item[0], GlobalData.gINF_MODULE_DIR):
                IsValidFileFlag = True
            else:
                Logger.Error("InfParser", 
                             ToolError.FORMAT_INVALID,
Severity: Major
Found in BaseTools/Source/Python/UPT/Object/Parser/InfSoucesObject.py and 1 other location - About 4 hrs to fix
BaseTools/Source/Python/UPT/Object/Parser/InfPackagesObject.py on lines 96..107

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

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

                elif IsValidPath(PackageItem[0], GlobalData.gINF_MODULE_DIR):
                    IsValidFileFlag = True           
                elif IsValidPath(PackageItem[0], GlobalData.gWORKSPACE):
                    IsValidFileFlag = True
                else:
BaseTools/Source/Python/UPT/Object/Parser/InfSoucesObject.py on lines 119..128

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

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