hackedteam/vector-edk

View on GitHub

Showing 3,985 of 13,510 total issues

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

            for LibGuidVer in LibGuidVerList:
                GuiVerElem = \
                CreateXmlElement('GUID', LibGuidVer.GetLibGuid(), [], [['Version', LibGuidVer.GetLibVersion()]])
                GuiVerElemList.append(GuiVerElem)
Severity: Minor
Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 1 other location - About 45 mins to fix
BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 78..82

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

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

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

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

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

Refactorings

Further Reading

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

TestsDir = os.path.realpath(os.path.split(sys.argv[0])[0])
Severity: Minor
Found in BaseTools/Tests/TestTools.py and 1 other location - About 45 mins to fix
OvmfPkg/ResetVector/Build.py on lines 27..27

Duplicated Code

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

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

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

Tuning

This issue has a mass of 35.

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

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

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

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

Refactorings

Further Reading

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

        elif PcdValue.strip().startswith('\"'):
            StringValue = PcdValue.strip().lstrip('\"').rstrip('\"')
            if IsValidBareCString(StringValue):
                IsTrue = True
Severity: Minor
Found in BaseTools/Source/Python/UPT/Library/ParserValidate.py and 1 other location - About 45 mins to fix
BaseTools/Source/Python/UPT/Library/ParserValidate.py on lines 601..604

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

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

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

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

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

Refactorings

Further Reading

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

            if len(AsBuiltNodeList) > 0:
                Element = CreateXmlElement('AsBuilt', '', AsBuiltNodeList, [])
                NodeList.append(Element)
Severity: Minor
Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 1 other location - About 45 mins to fix
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 157..159

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

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

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

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

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

Refactorings

Further Reading

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

            if ((self.Attributes & 0x00000800) != 0 and len(FfsObj) == 0xFFFFFF) \
                or ((self.Attributes & 0x00000800) == 0 and len(FfsObj) == 0):
                if LastFfsObj != None:
                    LastFfsObj.FreeSpace = EndOfFv - LastFfsObj._OFF_ - len(LastFfsObj)
Severity: Minor
Found in BaseTools/Source/Python/Eot/FvImage.py and 1 other location - About 45 mins to fix
BaseTools/Source/Python/Eot/FvImage.py on lines 483..484

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

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

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

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

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

Refactorings

Further Reading

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

                            if not os.path.exists(InfPath):
                                EdkLogger.error('build', GENFDS_ERROR, "Non-existant Module %s !" % (FfsFile.InfFileName))
Severity: Minor
Found in BaseTools/Source/Python/AutoGen/AutoGen.py and 1 other location - About 45 mins to fix
BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 154..155

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

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

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

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

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

Refactorings

Further Reading

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

            if os.path.normcase (ActivePlatform).find(Workspace) != 0:
                EdkLogger.error("GenFds", FILE_NOT_FOUND, "ActivePlatform doesn't exist in Workspace!")
Severity: Minor
Found in BaseTools/Source/Python/GenFds/GenFds.py and 1 other location - About 45 mins to fix
BaseTools/Source/Python/GenFds/GenFds.py on lines 106..107

Duplicated Code

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

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

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

Tuning

This issue has a mass of 35.

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

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

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

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

Refactorings

Further Reading

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

        if BuildCommand == None or len(BuildCommand) == 0:
            EdkLogger.error("build", OPTION_MISSING,
                            "No build command found for this module. "
                            "Please check your setting of %s_%s_%s_MAKE_PATH in Conf/tools_def.txt file." %
                                (AutoGenObject.BuildTarget, AutoGenObject.ToolChain, AutoGenObject.Arch),
Severity: Minor
Found in BaseTools/Source/Python/build/build.py and 1 other location - About 45 mins to fix
BaseTools/Source/Python/build/build.py on lines 313..318

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

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

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

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

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

Refactorings

Further Reading

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

        if PcdValue.strip().startswith('L\"'):
            StringValue = PcdValue.strip().lstrip('L\"').rstrip('\"')
            if IsValidBareCString(StringValue):
                IsTrue = True
Severity: Minor
Found in BaseTools/Source/Python/UPT/Library/ParserValidate.py and 1 other location - About 45 mins to fix
BaseTools/Source/Python/UPT/Library/ParserValidate.py on lines 605..608

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

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

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

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

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

Refactorings

Further Reading

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

        if Item and len(Item.FileNamList) > 0 and Item.FileNamList[0].FileType == 'FREEFORM':
Severity: Minor
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 1 other location - About 45 mins to fix
BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 613..613

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

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

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

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

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

Refactorings

Further Reading

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

        if 'UEFI_SPECIFICATION_VERSION' in self.Specification:
          AsBuiltInfDict['module_uefi_specification_version'] += [self.Specification['UEFI_SPECIFICATION_VERSION']]
Severity: Minor
Found in BaseTools/Source/Python/AutoGen/AutoGen.py and 1 other location - About 45 mins to fix
BaseTools/Source/Python/AutoGen/AutoGen.py on lines 2852..2853

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

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

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

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

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

Refactorings

Further Reading

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

    DbItemTotal = [DbInitValueUint64, DbVardefValueUint64, DbInitValueUint32, DbVardefValueUint32, DbVpdHeadValue, DbExMapTable, 
               DbLocalTokenNumberTable, DbGuidTable, DbStringHeadValue,  DbPcdNameOffsetTable,DbVariableTable,DbSkuTable, DbStringTableLen, DbPcdTokenTable, DbPcdCNameTable, 
               DbSizeTableValue, DbInitValueUint16, DbVardefValueUint16,DbInitValueUint8, DbVardefValueUint8, DbInitValueBoolean,
               DbVardefValueBoolean, DbSkuidValue, DbSkuIndexValue, DbUnInitValueUint64, DbUnInitValueUint32, DbUnInitValueUint16, DbUnInitValueUint8, DbUnInitValueBoolean]
Severity: Minor
Found in BaseTools/Source/Python/AutoGen/GenPcdDb.py and 1 other location - About 45 mins to fix
BaseTools/Source/Python/AutoGen/GenPcdDb.py on lines 777..780

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

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

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

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

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

Refactorings

Further Reading

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

class CapsuleAfile (CapsuleData):
    ## The constructor
    #
    #   @param  self        The object pointer
    #
Severity: Minor
Found in BaseTools/Source/Python/GenFds/CapsuleData.py and 1 other location - About 45 mins to fix
BaseTools/Source/Python/GenFds/CapsuleData.py on lines 122..137

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

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

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

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

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

Refactorings

Further Reading

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

ALL_USAGE_TOKENS = {
  "PRODUCES"           : "PRODUCES",
  "PRODUCED"           : "PRODUCES",
  "ALWAYS_PRODUCES"    : "PRODUCES",
  "ALWAYS_PRODUCED"    : "PRODUCES",
Severity: Minor
Found in BaseTools/Source/Python/UPT/Library/DataType.py and 1 other location - About 45 mins to fix
BaseTools/Source/Python/UPT/Xml/IniToXml.py on lines 299..302

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

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

Severity
Category
Status
Source
Language