hackedteam/vector-edk

View on GitHub

Showing 3,985 of 13,510 total issues

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

                if Record[1] == Arch or Record[1] == TAB_ARCH_COMMON.upper():
Severity: Major
Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
BaseTools/Source/Python/Common/DscClassObject.py on lines 767..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 34.

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

        if XmlList(Item, '/PackageSurfaceArea/IndustryStandardIncludes') and \
        not XmlList(Item, '/PackageSurfaceArea/IndustryStandardIncludes/IndustryStandardHeader'):
            Package.SetStandardIncludeFileList([None])
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 699..701
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 723..725
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 734..736
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 791..793
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

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

        if XmlList(Item, '/PackageSurfaceArea/ProtocolDeclarations') and not \
           XmlList(Item, '/PackageSurfaceArea/ProtocolDeclarations/Entry'):
            Package.SetProtocolList([None])
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 699..701
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 723..725
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 734..736
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 791..793
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

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

        if XmlList(Item, '/PackageSurfaceArea/PpiDeclarations') and not \
           XmlList(Item, '/PackageSurfaceArea/PpiDeclarations/Entry'):
            Package.SetPpiList([None])
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 699..701
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 723..725
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 734..736
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 791..793
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

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

        if XmlList(Item, '/ModuleSurfaceArea/BinaryFiles') and \
           not XmlList(Item, '/ModuleSurfaceArea/BinaryFiles/BinaryFile') :
            Module.SetBinaryFileList([None])
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 699..701
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 734..736
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 791..793
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

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

        if XmlList(Item, '/ModuleSurfaceArea/LibraryClassDefinitions') and \
           not XmlList(Item, '/ModuleSurfaceArea/LibraryClassDefinitions/LibraryClass'):
            Module.SetLibraryClassList([None])
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 723..725
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 734..736
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 791..793
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

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

            if XmlList(Item, '/ModuleSurfaceArea/PcdCoded') and \
                not XmlList(Item, '/ModuleSurfaceArea/PcdCoded/PcdEntry'):
                Module.SetPcdList([None])
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 699..701
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 723..725
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 734..736
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

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

        if XmlList(Item, '/PackageSurfaceArea/PackageIncludes') and not \
           XmlList(Item, '/PackageSurfaceArea/PackageIncludes/PackageHeader'):
            Package.SetPackageIncludeFileList([None])
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 699..701
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 723..725
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 734..736
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 791..793
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

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

        if XmlList(Item, '/PackageSurfaceArea/PcdDeclarations') and not \
           XmlList(Item, '/PackageSurfaceArea/PcdDeclarations/PcdEntry'):
            Package.SetPcdList([None])
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 699..701
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 723..725
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 734..736
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 791..793
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248

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

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

        if XmlList(Item, '/ModuleSurfaceArea/PackageDependencies') and \
           not XmlList(Item, '/ModuleSurfaceArea/PackageDependencies/Package'):
            Module.SetPackageDependencyList([None])
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 699..701
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 723..725
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 791..793
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

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_imports2.py on lines 0..16

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

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 _Done(self):
        self._Finished = True
        ## Do not set end flag when processing included files
        if self._From == -1:
            self._Table.SetEndFlag()
Severity: Minor
Found in BaseTools/Source/Python/Workspace/MetaFileParser.py and 1 other location - About 40 mins to fix
BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py on lines 190..194

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

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

        for name in list:
            try:
                dict[name] = function(name)
            except (os.error, IOError):
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/RCSProxy.py and 1 other location - About 40 mins to fix
AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/FSProxy.py on lines 203..206

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

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(Key) == 1 and Key[0][0] != CommentCharacter:
Severity: Minor
Found in BaseTools/Source/Python/Common/String.py and 1 other location - About 40 mins to fix
BaseTools/Source/Python/UPT/Library/String.py on lines 432..432

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

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 __ProcessBuildOption(self):
        self._ValueList = [ReplaceMacro(Value, self._Macros, RaiseError=False)
                           for Value in self._ValueList]
Severity: Major
Found in BaseTools/Source/Python/Workspace/MetaFileParser.py and 3 other locations - About 40 mins to fix
BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py on lines 1360..1362
BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py on lines 1401..1403
BaseTools/Source/Python/Workspace/MetaFileParser.py on lines 1487..1489

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

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 logger().UTIL_TRACE or logger().VERBOSE:
           logger().log( "[spi] Erasing SPI Flash block @ 0x%X" % spi_fla )
Severity: Minor
Found in vector-uefi/fd/tool/chipsec/hal/spi.py and 1 other location - About 40 mins to fix
vector-uefi/fd/tool/chipsec/hal/spi.py on lines 782..783

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

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 UpperPath in self._UPPER_CACHE_:
            return os.path.join(self._Root, self._UPPER_CACHE_[UpperPath])
Severity: Minor
Found in BaseTools/Source/Python/Common/Misc.py and 1 other location - About 40 mins to fix
BaseTools/Source/Python/Common/Misc.py on lines 387..390

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

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 _Done(self):
        self._Finished = True
        ## Do not set end flag when processing included files
        if self._From == -1:
            self._Table.SetEndFlag()
Severity: Minor
Found in BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py and 1 other location - About 40 mins to fix
BaseTools/Source/Python/Workspace/MetaFileParser.py on lines 194..198

Duplicated Code

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

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

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

Tuning

This issue has a mass of 34.

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 __ProcessSkuId(self):
        self._ValueList = [ReplaceMacro(Value, self._Macros, RaiseError=True)
                           for Value in self._ValueList]
BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py on lines 1401..1403
BaseTools/Source/Python/Workspace/MetaFileParser.py on lines 1487..1489
BaseTools/Source/Python/Workspace/MetaFileParser.py on lines 1527..1529

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

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

                    DecPcds[Pcd[0], Pcd[1]] = Pkg.Pcds[Pcd]
Severity: Minor
Found in BaseTools/Source/Python/AutoGen/AutoGen.py and 1 other location - About 40 mins to fix
BaseTools/Source/Python/Workspace/WorkspaceCommon.py on lines 49..50

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

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