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

                if IncludeFile[1] == Arch or IncludeFile[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 289..289
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 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 289..289
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 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 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 289..289
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

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 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 289..289
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 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, '/ModuleSurfaceArea/Guids') and not XmlList(Item, '/ModuleSurfaceArea/Guids/GuidCName'):
            Module.SetGuidList([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 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/PPIs') and not XmlList(Item, '/ModuleSurfaceArea/PPIs/Ppi'):
            Module.SetPpiList([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 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 20 locations. Consider refactoring.
Open

                if IncludeFile[1] == Arch or IncludeFile[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 289..289
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 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 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 289..289
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 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/LibraryClassDeclarations') and \
           not XmlList(Item, '/PackageSurfaceArea/LibraryClassDeclarations/LibraryClass'):
            Package.SetLibraryClassList([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 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/Protocols') and not XmlList(Item, '/ModuleSurfaceArea/Protocols/Protocol'):
            Module.SetProtocolList([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 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 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 289..289
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 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 20 locations. Consider refactoring.
Open

                if IncludeFile[1] == Arch or IncludeFile[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 289..289
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 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 20 locations. Consider refactoring.
Open

                if IncludeFile[1] == Arch or IncludeFile[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 289..289
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 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, '/ModuleSurfaceArea/SourceFiles') and \
           not XmlList(Item, '/ModuleSurfaceArea/SourceFiles/Filename') :
            Module.SetSourceFileList([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 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 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 289..289
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 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 20 locations. Consider refactoring.
Open

                if IncludeFile[1] == Arch or IncludeFile[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 289..289
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 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 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 289..289
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 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/GuidDeclarations') and not \
           XmlList(Item, '/PackageSurfaceArea/GuidDeclarations/Entry'):
            Package.SetGuidList([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 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/Externs') and not XmlList(Item, '/ModuleSurfaceArea/Externs/Extern'):
            Module.SetExternList([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 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

Severity
Category
Status
Source
Language