hackedteam/vector-edk

View on GitHub

Showing 3,985 of 13,510 total issues

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

Severity: Major
Found in vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_8.py and 11 other locations - About 1 day to fix
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_16_be.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_16_le.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_32_be.py on lines 0..29
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_32_le.py on lines 0..29
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_7.py on lines 0..30
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_8.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_16_be.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_16_le.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_32_be.py on lines 0..29
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_32_le.py on lines 0..29
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_7.py on lines 0..30

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

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

AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_16_be.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_16_le.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_32_be.py on lines 0..29
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_32_le.py on lines 0..29
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_7.py on lines 0..30
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_8.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_16_be.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_16_le.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_32_le.py on lines 0..29
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_7.py on lines 0..30
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_8.py on lines 0..34

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

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

AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_16_be.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_16_le.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_32_le.py on lines 0..29
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_7.py on lines 0..30
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_8.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_16_be.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_16_le.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_32_be.py on lines 0..29
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_32_le.py on lines 0..29
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_7.py on lines 0..30
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_8.py on lines 0..34

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

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

AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_16_be.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_16_le.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_32_be.py on lines 0..29
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_32_le.py on lines 0..29
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_7.py on lines 0..30
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_16_be.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_16_le.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_32_be.py on lines 0..29
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_32_le.py on lines 0..29
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_7.py on lines 0..30
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/utf_8.py on lines 0..34

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

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

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

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

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

Refactorings

Further Reading

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

    def _GetPpi(self):
        if self._Ppis == None:
            #
            # tdict is a special kind of dict, used for selecting correct
            # PPI defition for given ARCH
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 2 other locations - About 1 day to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1258..1280
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1308..1330

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

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

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

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

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

Refactorings

Further Reading

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

            if len(Key) == 1 and Key[0][0] != CommentCharacter and Key[0] not in Keys: 
                if ValueSplitFlag:
                    Dictionary[Key[0]] = LineList[1].replace('\\','/').split(ValueSplitCharacter)
                else:
                    Dictionary[Key[0]] = LineList[1].strip().replace('\\','/')
Severity: Major
Found in BaseTools/Source/Python/Common/EdkIIWorkspace.py and 1 other location - About 1 day to fix
BaseTools/Source/Python/Common/Dictionary.py on lines 37..42

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

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

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

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

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

Refactorings

Further Reading

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

            if len(Key) == 1 and Key[0][0] != CommentCharacter and Key[0] not in Keys:
                if ValueSplitFlag:
                    Dictionary[Key[0]] = LineList[1].replace('\\','/').split(ValueSplitCharacter)
                else:
                    Dictionary[Key[0]] = LineList[1].strip().replace('\\','/')
Severity: Major
Found in BaseTools/Source/Python/Common/Dictionary.py and 1 other location - About 1 day to fix
BaseTools/Source/Python/Common/EdkIIWorkspace.py on lines 228..233

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

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

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

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

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

Refactorings

Further Reading

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

    def _GetProtocol(self):
        if self._Protocols == None:
            #
            # tdict is a special kind of dict, used for selecting correct
            # protocol defition for given ARCH
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 2 other locations - About 1 day to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1283..1305
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1308..1330

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

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

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

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

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

Refactorings

Further Reading

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

    def _GetGuid(self):
        if self._Guids == None:
            #
            # tdict is a special kind of dict, used for selecting correct
            # GUID defition for given ARCH
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 2 other locations - About 1 day to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1258..1280
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1283..1305

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

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

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

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

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

Refactorings

Further Reading

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

                        if InOutStr != 'in, out':
                            ErrorMsgList.append('Line %d : in Comment, <%s> does NOT have %s ' % (CommentStartLine, (TagPartList[0] + ' ' + TagPartList[1]).replace('\n', '').replace('\r', ''), '[' + InOutStr + ']'))
                            PrintErrorMsg(ERROR_DOXYGEN_CHECK_FUNCTION_HEADER, 'in Comment, <%s> does NOT have %s ' % ((TagPartList[0] + ' ' + TagPartList[1]).replace('\n', '').replace('\r', ''), '[' + InOutStr + ']'), TableName, CommentId)
Severity: Major
Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 day to fix
BaseTools/Source/Python/Ecc/c.py on lines 2569..2571

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

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

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

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

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

Refactorings

Further Reading

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

    for enum in FileProfile.EnumerationDefinitionList:
        LBPos = enum.Content.find('{')
        RBPos = enum.Content.find('}')
        Name = enum.Content[4:LBPos].strip()
        Value = enum.Content[LBPos+1:RBPos]
Severity: Major
Found in BaseTools/Source/Python/Eot/c.py and 1 other location - About 1 day to fix
BaseTools/Source/Python/Ecc/c.py on lines 206..212

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

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

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

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

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

Refactorings

Further Reading

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

                            if Tag.find('[in,out]') == -1:
                                ErrorMsgList.append('Line %d : in Comment, <%s> does NOT have %s ' % (CommentStartLine, (TagPartList[0] + ' ' + TagPartList[1]).replace('\n', '').replace('\r', ''), '[' + InOutStr + ']'))
                                PrintErrorMsg(ERROR_DOXYGEN_CHECK_FUNCTION_HEADER, 'in Comment, <%s> does NOT have %s ' % ((TagPartList[0] + ' ' + TagPartList[1]).replace('\n', '').replace('\r', ''), '[' + InOutStr + ']'), TableName, CommentId)
Severity: Major
Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 day to fix
BaseTools/Source/Python/Ecc/c.py on lines 2565..2567

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

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

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

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

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

Refactorings

Further Reading

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

    for enum in FileProfile.EnumerationDefinitionList:
        LBPos = enum.Content.find('{')
        RBPos = enum.Content.find('}')
        Name = enum.Content[4:LBPos].strip()
        Value = enum.Content[LBPos + 1:RBPos]
Severity: Major
Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 day to fix
BaseTools/Source/Python/Eot/c.py on lines 181..187

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

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 (Key[0] == 'PCDSPATCHABLEINMODULE' and PcdItemObj.GetItemType() == 'PatchPcd') and \
           (Key[1] == 'COMMON' or Key[1] == Arch):
                for PcdInDec in DecPcdsDict[Key]:
                    if PcdInDec.TokenCName == PcdItemObj.CName and \
                       PcdInDec.TokenSpaceGuidCName == PcdItemObj.TokenSpaceGuidCName:
Severity: Major
Found in BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py and 1 other location - About 1 day to fix
BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py on lines 494..501

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

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

    for Result in ResultSet:
        ParamList = GetParamList(Result[1])
        FuncName = Result[3]
        if EccGlobalData.gException.IsException(ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE, FuncName):
            continue
Severity: Major
Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 day to fix
BaseTools/Source/Python/Ecc/c.py on lines 1873..1884

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

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

    def VARS_list_EFI_variables ( self, infcls=2 ):
        varlist = os.listdir('/sys/firmware/efi/vars')
        variables = dict()
        for v in varlist:
            name = v[:-37]
Severity: Major
Found in vector-uefi/fd/tool/chipsec/helper/linux/helper.py and 1 other location - About 1 day to fix
vector-uefi/fd/tool/chipsec/helper/linux/helper.py on lines 401..413

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

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

    def EFIVARS_list_EFI_variables ( self, infcls=2 ):
        varlist = os.listdir('/sys/firmware/efi/efivars')
        variables = dict()
        for v in varlist:
            name = v[:-37]
Severity: Major
Found in vector-uefi/fd/tool/chipsec/helper/linux/helper.py and 1 other location - About 1 day to fix
vector-uefi/fd/tool/chipsec/helper/linux/helper.py on lines 332..344

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

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 (Key[0] == 'PCDSDYNAMICEX' and PcdItemObj.GetItemType() == 'PcdEx') and \
                (Key[1] == 'COMMON' or Key[1] == Arch):
                for PcdInDec in DecPcdsDict[Key]:
                    if PcdInDec.TokenCName == PcdItemObj.CName and \
                       PcdInDec.TokenSpaceGuidCName == PcdItemObj.TokenSpaceGuidCName:
Severity: Major
Found in BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py and 1 other location - About 1 day to fix
BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py on lines 503..510

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

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

    for Result in ResultSet:
        ParamList = GetParamList(Result[1])
        FuncName = Result[3]
        if EccGlobalData.gException.IsException(ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE, FuncName):
            continue
Severity: Major
Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 day to fix
BaseTools/Source/Python/Ecc/c.py on lines 1855..1866

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

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

AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5hkscs.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp932.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp949.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp950.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jis_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jisx0213.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jp.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_kr.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb18030.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb2312.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gbk.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/hz.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_1.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_3.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_ext.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_kr.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/johab.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jisx0213.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/big5.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/big5hkscs.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp932.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp949.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp950.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jis_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jisx0213.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jp.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_kr.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gb18030.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gb2312.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gbk.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/hz.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_1.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_2.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_3.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_ext.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_kr.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/johab.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jis.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jis_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jisx0213.py on lines 0..34

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

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