hackedteam/vector-edk

View on GitHub

Showing 3,985 of 13,510 total issues

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

                hashValue = (temp ^ (CrcTable[_bufferBase[cur + 3] & 0xFF] << 5)) & _hashMask;
vector-uefi/insyde/7zip/Java/SevenZip/Compression/LZ/BinTree.java on lines 145..145

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

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

                    if ErrorCode != 0:
                        EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo,
                                        File=self.MetaFile, Line=LineNo)
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 6 other locations - About 30 mins to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1344..1345
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1367..1368
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1763..1765
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2023..2024
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2060..2061
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2225..2226

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

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

                if ErrorCode != 0:
                    EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo,
                                    File=self.MetaFile, Line=LineNo)
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 6 other locations - About 30 mins to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1344..1345
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1367..1368
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1793..1795
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2023..2024
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2060..2061
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2225..2226

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

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

                if ErrorCode != 0:
                    EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 6 other locations - About 30 mins to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1367..1368
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1763..1765
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1793..1795
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2023..2024
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2060..2061
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2225..2226

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

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

                if ErrorCode != 0:
                    EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 6 other locations - About 30 mins to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1344..1345
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1763..1765
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1793..1795
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2023..2024
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2060..2061
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2225..2226

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

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

                if ErrorCode != 0:
                    EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 6 other locations - About 30 mins to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1344..1345
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1367..1368
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1763..1765
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1793..1795
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2023..2024
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2060..2061

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

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

                    if ErrorCode != 0:
                        EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 6 other locations - About 30 mins to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1344..1345
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1367..1368
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1763..1765
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1793..1795
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2023..2024
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2225..2226

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

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

                if ErrorCode != 0:
                    EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 6 other locations - About 30 mins to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1344..1345
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1367..1368
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1763..1765
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1793..1795
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2060..2061
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 2225..2226

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

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

            if ErrorCode != 0:
                EdkLogger.error('build', ErrorCode, File=self.MetaFile, Line=LineNo,
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 3 other locations - About 30 mins to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 519..520
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 598..599
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 627..628

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

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

class PredicateExpression :
    ## The constructor
    #
    #   @param  self        The object pointer
    #   @param  Str         The message to record
Severity: Major
Found in BaseTools/Source/Python/Ecc/CodeFragment.py and 10 other locations - About 30 mins to fix
AppPkg/Applications/Python/Python-2.7.2/Tools/framer/framer/structparse.py on lines 10..14
AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Instances.py on lines 14..18
AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Instances.py on lines 50..54
BaseTools/Source/Python/Ecc/CodeFragment.py on lines 37..48
BaseTools/Source/Python/Ecc/CodeFragment.py on lines 106..117
BaseTools/Source/Python/Ecc/CodeFragment.py on lines 122..133
BaseTools/Source/Python/Eot/CodeFragment.py on lines 37..48
BaseTools/Source/Python/Eot/CodeFragment.py on lines 71..82
BaseTools/Source/Python/Eot/CodeFragment.py on lines 124..135
BaseTools/Source/Python/Eot/CodeFragment.py on lines 140..151

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

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

class StructUnionDefinition :
    ## The constructor
    #
    #   @param  self        The object pointer
    #   @param  Str         The message to record
Severity: Major
Found in BaseTools/Source/Python/Ecc/CodeFragment.py and 10 other locations - About 30 mins to fix
AppPkg/Applications/Python/Python-2.7.2/Tools/framer/framer/structparse.py on lines 10..14
AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Instances.py on lines 14..18
AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Instances.py on lines 50..54
BaseTools/Source/Python/Ecc/CodeFragment.py on lines 37..48
BaseTools/Source/Python/Ecc/CodeFragment.py on lines 53..64
BaseTools/Source/Python/Ecc/CodeFragment.py on lines 106..117
BaseTools/Source/Python/Eot/CodeFragment.py on lines 37..48
BaseTools/Source/Python/Eot/CodeFragment.py on lines 71..82
BaseTools/Source/Python/Eot/CodeFragment.py on lines 124..135
BaseTools/Source/Python/Eot/CodeFragment.py on lines 140..151

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

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

        class d:
            def __init__(self,a,b,c):
                self.a = a
                self.b = b
                self.c = c
AppPkg/Applications/Python/Python-2.7.2/Tools/framer/framer/structparse.py on lines 10..14
AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Instances.py on lines 14..18
BaseTools/Source/Python/Ecc/CodeFragment.py on lines 37..48
BaseTools/Source/Python/Ecc/CodeFragment.py on lines 53..64
BaseTools/Source/Python/Ecc/CodeFragment.py on lines 106..117
BaseTools/Source/Python/Ecc/CodeFragment.py on lines 122..133
BaseTools/Source/Python/Eot/CodeFragment.py on lines 37..48
BaseTools/Source/Python/Eot/CodeFragment.py on lines 71..82
BaseTools/Source/Python/Eot/CodeFragment.py on lines 124..135
BaseTools/Source/Python/Eot/CodeFragment.py on lines 140..151

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

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

        for Item in GuidProtocolPpi.GetHelpTextList():
            Tmp = HelpTextXml()
            NodeList.append(Tmp.ToXml(Item))
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py and 10 other locations - About 30 mins to fix
BaseTools/Source/Python/UPT/Xml/CommonXml.py on lines 802..804
BaseTools/Source/Python/UPT/Xml/CommonXml.py on lines 823..825
BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py on lines 99..101
BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py on lines 166..168
BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py on lines 280..282
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 113..115
BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 283..285
BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 314..316
BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 345..347
BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 377..379

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

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

    def log_unknown( self, text ):
        """Logs a message with a question mark."""
        text = "[?] " + text
        self._log(text, None, None)
Severity: Major
Found in vector-uefi/fd/tool/chipsec/logger.py and 10 other locations - About 30 mins to fix
vector-uefi/fd/tool/chipsec/logger.py on lines 224..227
vector-uefi/fd/tool/chipsec/logger.py on lines 229..232
vector-uefi/fd/tool/chipsec/logger.py on lines 269..272
vector-uefi/fd/tool/chipsec/logger.py on lines 274..277
vector-uefi/fd/tool/chipsec/logger.py on lines 279..282
vector-uefi/fd/tool/chipsec/logger.py on lines 285..288
vector-uefi/fd/tool/chipsec/logger.py on lines 294..297
vector-uefi/fd/tool/chipsec/logger.py on lines 299..302
vector-uefi/fd/tool/chipsec/logger.py on lines 304..307
vector-uefi/fd/tool/chipsec/logger.py on lines 309..312

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

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

def f_mod(x):
    return ( x.find('__init__') == -1 and MODFILE_RE.match(x) )
Severity: Major
Found in vector-uefi/fd/tool/patch.py and 9 other locations - About 30 mins to fix
vector-uefi/fd/tool/chipsec/helper/oshelper.py on lines 58..59
vector-uefi/fd/tool/chipsec_main.py on lines 88..89
vector-uefi/fd/tool/chipsec_util.py on lines 66..67
vector-uefi/fd/tool/chipsec_util.py on lines 72..73
vector-uefi/fd/tool/flash.py on lines 73..74
vector-uefi/fd/tool/flash.py on lines 79..80
vector-uefi/fd/tool/patch.py on lines 73..74
vector-uefi/fd/tool/test.py on lines 73..74
vector-uefi/fd/tool/test.py on lines 79..80

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

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

        for Item in LibraryClass.GetHelpTextList():
            Tmp = HelpTextXml()
            NodeList.append(Tmp.ToXml(Item))
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/CommonXml.py and 10 other locations - About 30 mins to fix
BaseTools/Source/Python/UPT/Xml/CommonXml.py on lines 802..804
BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py on lines 99..101
BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py on lines 166..168
BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py on lines 225..227
BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py on lines 280..282
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 113..115
BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 283..285
BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 314..316
BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 345..347
BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 377..379

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

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

    def log_warning( self, text ):
        """Logs a Warning message"""
        text = "[!] WARNING: " + text
        self._log(text, YELLOW, None)
Severity: Major
Found in vector-uefi/fd/tool/chipsec/logger.py and 10 other locations - About 30 mins to fix
vector-uefi/fd/tool/chipsec/logger.py on lines 224..227
vector-uefi/fd/tool/chipsec/logger.py on lines 229..232
vector-uefi/fd/tool/chipsec/logger.py on lines 269..272
vector-uefi/fd/tool/chipsec/logger.py on lines 274..277
vector-uefi/fd/tool/chipsec/logger.py on lines 285..288
vector-uefi/fd/tool/chipsec/logger.py on lines 294..297
vector-uefi/fd/tool/chipsec/logger.py on lines 299..302
vector-uefi/fd/tool/chipsec/logger.py on lines 304..307
vector-uefi/fd/tool/chipsec/logger.py on lines 309..312
vector-uefi/fd/tool/chipsec/logger.py on lines 314..317

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

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

    def warn( self, text ):
        """Logs an Warning message"""
        text = "WARNING: " + text
        self._log(text, YELLOW, None)
Severity: Major
Found in vector-uefi/fd/tool/chipsec/logger.py and 10 other locations - About 30 mins to fix
vector-uefi/fd/tool/chipsec/logger.py on lines 224..227
vector-uefi/fd/tool/chipsec/logger.py on lines 269..272
vector-uefi/fd/tool/chipsec/logger.py on lines 274..277
vector-uefi/fd/tool/chipsec/logger.py on lines 279..282
vector-uefi/fd/tool/chipsec/logger.py on lines 285..288
vector-uefi/fd/tool/chipsec/logger.py on lines 294..297
vector-uefi/fd/tool/chipsec/logger.py on lines 299..302
vector-uefi/fd/tool/chipsec/logger.py on lines 304..307
vector-uefi/fd/tool/chipsec/logger.py on lines 309..312
vector-uefi/fd/tool/chipsec/logger.py on lines 314..317

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

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

def f_mod(x):
    return ( x.find('__init__') == -1 and MODFILE_RE.match(x) )
Severity: Major
Found in vector-uefi/fd/tool/chipsec_util.py and 9 other locations - About 30 mins to fix
vector-uefi/fd/tool/chipsec/helper/oshelper.py on lines 58..59
vector-uefi/fd/tool/chipsec_main.py on lines 88..89
vector-uefi/fd/tool/chipsec_util.py on lines 66..67
vector-uefi/fd/tool/flash.py on lines 73..74
vector-uefi/fd/tool/flash.py on lines 79..80
vector-uefi/fd/tool/patch.py on lines 73..74
vector-uefi/fd/tool/patch.py on lines 79..80
vector-uefi/fd/tool/test.py on lines 73..74
vector-uefi/fd/tool/test.py on lines 79..80

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

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

def f_mod(x):
    return ( x.find('__init__') == -1 and MODFILE_RE.match(x) )
Severity: Major
Found in vector-uefi/fd/tool/flash.py and 9 other locations - About 30 mins to fix
vector-uefi/fd/tool/chipsec/helper/oshelper.py on lines 58..59
vector-uefi/fd/tool/chipsec_main.py on lines 88..89
vector-uefi/fd/tool/chipsec_util.py on lines 66..67
vector-uefi/fd/tool/chipsec_util.py on lines 72..73
vector-uefi/fd/tool/flash.py on lines 73..74
vector-uefi/fd/tool/patch.py on lines 73..74
vector-uefi/fd/tool/patch.py on lines 79..80
vector-uefi/fd/tool/test.py on lines 73..74
vector-uefi/fd/tool/test.py on lines 79..80

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

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