hackedteam/vector-edk

View on GitHub

Showing 3,985 of 13,510 total issues

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

    for Item in Module.GetPackageDependencyList():
        if Item == None:
            CheckDict = {'Package':''}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

    for Item in Module.GetLibraryClassList():
        if Item == None:
            CheckDict = {'LibraryClass':''}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

    for Item in Package.GetPpiList():
        if Item == None:
            CheckDict = {'Entry':''}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

    for Item in Module.GetPpiList():
        if Item == None:
            CheckDict = {'Ppi':''}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

    for Item in Package.GetStandardIncludeFileList():
        if Item == None:
            CheckDict = {'IndustryStandardHeader':''}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

    for Item in Module.GetSourceFileList():
        if Item == None:
            CheckDict = {'Filename':''}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

    for Item in Package.GetGuidList():
        if Item == None:
            CheckDict = {'Entry':''}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

    for Item in Module.GetBootModeList():
        CheckDict = {'Usage':Item.GetUsage(),
                     'SupportedBootModes':Item.GetSupportedBootModes()}
        IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

    for Item in Module.GetHobList():
        CheckDict = {'Usage':Item.GetUsage(),
                     'HobType':Item.GetHobType()}
        IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

    for Item in Package.GetGuidList():
        CheckDict = {'CName':Item.GetCName(),
                     'GuidValue':Item.GetGuid()}
        IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

    for Item in Module.GetPcdList():
        if Item == None:
            CheckDict = {'PcdEntry':''}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

    for Item in Package.GetPcdList():
        if Item == None:
            CheckDict = {'PcdEntry':''}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871

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

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

        for File in Item.GetFileNameList():
            CheckDict = {'Filename':File.GetFilename(),
                         'FileType':File.GetFileType()}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

    for Item in Package.GetUserExtensionList():
        CheckDict = {'UserId':Item.GetUserID(), 'Identifier':Item.GetIdentifier()}
        IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877

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

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

    for Item in Module.GetExternList():
        if Item == None:
            CheckDict = {'Extern':''}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

    for Item in Package.GetProtocolList():
        if Item == None:
            CheckDict = {'Entry':''}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

    for Item in Module.GetPpiList():
        CheckDict = {'CName':Item.GetCName(),
                     'Usage':Item.GetUsage()}
        IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

    for Item in Module.GetUserExtensionList():
        CheckDict = {'UserId':Item.GetUserID(), 'Identifier':Item.GetIdentifier()}
        IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

    for Item in Module.GetProtocolList():
        CheckDict = {'CName':Item.GetCName(),
                     'Usage':Item.GetUsage()}
        IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

    for Item in Module.GetEventList():
        CheckDict = {'Usage':Item.GetUsage(),
                     'EventType':Item.GetEventType()}
        IsRequiredItemListNull(CheckDict, XmlTreeLevel)
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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