hackedteam/vector-edk

View on GitHub

Showing 3,985 of 13,510 total issues

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

        if type(otherseq) != type(self):
            otherseq = apply(bitvec, (otherseq, ) + rest)
Severity: Major
Found in AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py and 5 other locations - About 50 mins to fix
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 175..176
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 240..241
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 286..287
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 295..296
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 319..320

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

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

        if type(other) != type(self):
            other = apply(bitvec, (other, ) + rest)
Severity: Major
Found in AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py and 5 other locations - About 50 mins to fix
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 240..241
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 286..287
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 295..296
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 304..305
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 319..320

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

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

        if type(otherseq) != type(self):
            otherseq = apply(bitvec, (otherseq, ) + rest)
Severity: Major
Found in AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py and 5 other locations - About 50 mins to fix
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 175..176
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 240..241
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 286..287
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 304..305
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 319..320

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

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

        if type(otherseq) != type(self):
            otherseq = apply(bitvec, (otherseq, ) + rest)
Severity: Major
Found in AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py and 5 other locations - About 50 mins to fix
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 175..176
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 240..241
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 286..287
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 295..296
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 304..305

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

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

        if type(sequence) != type(self):
            sequence = apply(bitvec, (sequence, ) + rest)
Severity: Major
Found in AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py and 5 other locations - About 50 mins to fix
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 175..176
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 286..287
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 295..296
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 304..305
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 319..320

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

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

        if type(otherseq) != type(self):
            otherseq = apply(bitvec, (otherseq, ) + rest)
Severity: Major
Found in AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py and 5 other locations - About 50 mins to fix
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 175..176
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 240..241
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 295..296
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 304..305
AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py on lines 319..320

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

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 self._ItemType == MODEL_META_DATA_DEFINE:
            if self._SectionType == MODEL_META_DATA_HEADER:
                self._FileLocalMacros[Name] = Value
            else:
                self._ConstructSectionMacroDict(Name, Value)
Severity: Minor
Found in BaseTools/Source/Python/Workspace/MetaFileParser.py and 1 other location - About 50 mins to fix
BaseTools/Source/Python/Workspace/MetaFileParser.py on lines 75..83

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

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

        filename = struct.unpack("200s", self.ec.getMemoryService().read(str(filename), 200, 32))[0]
Severity: Minor
Found in ArmPlatformPkg/Scripts/Ds5/firmware_volume.py and 1 other location - About 50 mins to fix
ArmPlatformPkg/Scripts/Ds5/firmware_volume.py on lines 175..175

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

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

        Parser.add_option(
            "--build-dir",
            action = "store", type = "string", dest = "build_dir",
            default = os.path.join(self.base_dir, 'build'),
Severity: Major
Found in BaseTools/gcc/mingw-gcc-build.py and 3 other locations - About 50 mins to fix
BaseTools/gcc/mingw-gcc-build.py on lines 77..80
BaseTools/gcc/mingw-gcc-build.py on lines 89..92
BaseTools/gcc/mingw-gcc-build.py on lines 107..110

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

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

        bdf = PCI_BDF( bus&0xFFFF, device&0xFFFF, function&0xFFFF, address&0xFFFF )
Severity: Minor
Found in vector-uefi/fd/tool/chipsec/helper/win/win32helper.py and 1 other location - About 50 mins to fix
vector-uefi/fd/tool/chipsec/helper/win/win32helper.py on lines 578..578

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

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

        filename = struct.unpack("200s", self.ec.getMemoryService().read(str(filename), 200, 32))[0]
Severity: Minor
Found in ArmPlatformPkg/Scripts/Ds5/firmware_volume.py and 1 other location - About 50 mins to fix
ArmPlatformPkg/Scripts/Ds5/firmware_volume.py on lines 130..130

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

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

    def _GetFileKey(self):
        if self._Key == None:
            self._Key = self.Path.upper()
        return self._Key
Severity: Minor
Found in BaseTools/Source/Python/UPT/Library/Misc.py and 1 other location - About 50 mins to fix
BaseTools/Source/Python/Common/Misc.py on lines 1561..1564

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

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 'COMMON' in ArchList and len(ArchList) > 1:
            self._LoggerError(ST.ERR_DECPARSE_SECTION_COMMON)
Severity: Minor
Found in BaseTools/Source/Python/UPT/Parser/DecParser.py and 1 other location - About 50 mins to fix
BaseTools/Source/Python/UPT/Parser/DecParser.py on lines 917..918

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

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

        bdf = PCI_BDF( bus&0xFFFF, device&0xFFFF, function&0xFFFF, address&0xFFFF )
Severity: Minor
Found in vector-uefi/fd/tool/chipsec/helper/win/win32helper.py and 1 other location - About 50 mins to fix
vector-uefi/fd/tool/chipsec/helper/win/win32helper.py on lines 557..557

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

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

        if GenFds.OnlyGenerateThisCap != None and GenFds.OnlyGenerateThisCap.upper() in GenFdsGlobalVariable.FdfParser.Profile.CapsuleDict.keys():
Severity: Major
Found in BaseTools/Source/Python/GenFds/GenFds.py and 3 other locations - About 50 mins to fix
BaseTools/Source/Python/GenFds/GenFds.py on lines 358..358
BaseTools/Source/Python/GenFds/GenFds.py on lines 369..369
BaseTools/Source/Python/GenFds/GenFds.py on lines 404..404

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

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 type(self) == DecParser:
                    if MODEL_META_DATA_HEADER in self._SectionType:
                        self._FileLocalMacros[Name] = Value
                    else:
                        self._ConstructSectionMacroDict(Name, Value)
Severity: Minor
Found in BaseTools/Source/Python/Workspace/MetaFileParser.py and 1 other location - About 50 mins to fix
BaseTools/Source/Python/Workspace/MetaFileParser.py on lines 1353..1357

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

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

        Parser.add_option(
            "--src-dir",
            action = "store", type = "string", dest = "src_dir",
            default = os.path.join(self.base_dir, 'src'),
Severity: Major
Found in BaseTools/gcc/mingw-gcc-build.py and 3 other locations - About 50 mins to fix
BaseTools/gcc/mingw-gcc-build.py on lines 83..86
BaseTools/gcc/mingw-gcc-build.py on lines 89..92
BaseTools/gcc/mingw-gcc-build.py on lines 107..110

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

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

    def _GetFileKey(self):
        if self._Key == None:
            self._Key = self.Path.upper()   # + self.ToolChainFamily + self.TagName + self.ToolCode + self.Target
        return self._Key
Severity: Minor
Found in BaseTools/Source/Python/Common/Misc.py and 1 other location - About 50 mins to fix
BaseTools/Source/Python/UPT/Library/Misc.py on lines 524..527

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

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

        Parser.add_option(
            "--symlinks",
            action = "store", type = "string", dest = "symlinks",
            default = os.path.join(self.base_dir, 'symlinks'),
Severity: Major
Found in BaseTools/gcc/mingw-gcc-build.py and 3 other locations - About 50 mins to fix
BaseTools/gcc/mingw-gcc-build.py on lines 77..80
BaseTools/gcc/mingw-gcc-build.py on lines 83..86
BaseTools/gcc/mingw-gcc-build.py on lines 89..92

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

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

    def __SetCharValue(self, Line, Offset, Value):
        self.Profile.FileLinesList[Line - 1][Offset] = Value
Severity: Minor
Found in BaseTools/Source/Python/Ecc/CodeFragmentCollector.py and 1 other location - About 50 mins to fix
BaseTools/Source/Python/Eot/CodeFragmentCollector.py on lines 227..228

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

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