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

    def _GetBuildNumber(self):
        if self._BuildNumber == None:
            if self._Header == None:
                self._GetHeaderInfo()
            if self._BuildNumber == None:
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 11 other locations - About 2 hrs to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 352..358
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 370..376
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 379..385
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 388..394
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 444..450
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1249..1255
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1853..1859
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1873..1879
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1891..1897
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1900..1906
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1909..1915

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

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

    def _GetFdfFile(self):
        if self._FlashDefinition == None:
            if self._Header == None:
                self._GetHeaderInfo()
            if self._FlashDefinition == None:
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 11 other locations - About 2 hrs to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 361..367
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 370..376
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 379..385
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 388..394
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 444..450
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1249..1255
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1853..1859
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1873..1879
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1891..1897
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1900..1906
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1909..1915

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

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

    def _GetVpdToolGuid(self):
        if self._VpdToolGuid == None:
            if self._Header == None:
                self._GetHeaderInfo()
            if self._VpdToolGuid == None:
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 11 other locations - About 2 hrs to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 352..358
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 361..367
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 370..376
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 379..385
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 388..394
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1249..1255
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1853..1859
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1873..1879
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1891..1897
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1900..1906
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1909..1915

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

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

    def _GetRtBaseAddress(self):
        if self._RtBaseAddress == None:
            if self._Header == None:
                self._GetHeaderInfo()
            if self._RtBaseAddress == None:
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 11 other locations - About 2 hrs to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 352..358
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 361..367
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 370..376
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 379..385
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 444..450
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1249..1255
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1853..1859
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1873..1879
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1891..1897
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1900..1906
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1909..1915

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

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

    def _GetDxsFile(self):
        if self._DxsFile == None:
            if self._Header_ == None:
                self._GetHeaderInfo()
            if self._DxsFile == None:
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 11 other locations - About 2 hrs to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 352..358
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 361..367
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 370..376
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 379..385
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 388..394
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 444..450
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1249..1255
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1873..1879
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1891..1897
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1900..1906
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1909..1915

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

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

    def _GetVersion(self):
        if self._Version == None:
            if self._Header_ == None:
                self._GetHeaderInfo()
            if self._Version == None:
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 11 other locations - About 2 hrs to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 352..358
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 361..367
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 370..376
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 379..385
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 388..394
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 444..450
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1249..1255
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1853..1859
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1873..1879
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1891..1897
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1909..1915

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

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

    def _GetBsBaseAddress(self):
        if self._BsBaseAddress == None:
            if self._Header == None:
                self._GetHeaderInfo()
            if self._BsBaseAddress == None:
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 11 other locations - About 2 hrs to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 352..358
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 361..367
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 370..376
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 388..394
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 444..450
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1249..1255
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1853..1859
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1873..1879
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1891..1897
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1900..1906
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1909..1915

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

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

    def _GetFileGuid(self):
        if self._Guid == None:
            if self._Header_ == None:
                self._GetHeaderInfo()
            if self._Guid == None:
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 11 other locations - About 2 hrs to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 352..358
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 361..367
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 370..376
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 379..385
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 388..394
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 444..450
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1249..1255
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1853..1859
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1873..1879
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1900..1906
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1909..1915

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

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

    def _GetEntryPoint(self):
        if self._ModuleEntryPointList == None:
            if self._Header_ == None:
                self._GetHeaderInfo()
            if self._ModuleEntryPointList == None:
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 6 other locations - About 2 hrs to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 427..433
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 436..442
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1947..1953
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1965..1971
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1974..1980
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1983..1989

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

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

    if PciDeviceId != None:
        Name = DT.TAB_INF_DEFINES_PCI_DEVICE_ID
        Value = PciDeviceId.GetValue()
        Statement = _GenInfDefineStateMent(PciDeviceId.Comments.GetHeaderComments(),
                                           Name,
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 44..51
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 53..60
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 72..79
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 90..97
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 99..106
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 108..115

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

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

    def _GetDestructor(self):
        if self._DestructorList == None:
            if self._Header_ == None:
                self._GetHeaderInfo()
            if self._DestructorList == None:
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 6 other locations - About 2 hrs to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 427..433
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 436..442
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1947..1953
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1956..1962
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1965..1971
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1974..1980

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

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

    if EdkReleaseVersion != None:
        Name = DT.TAB_INF_DEFINES_EDK_RELEASE_VERSION
        Value = EdkReleaseVersion.GetValue()
        Statement = _GenInfDefineStateMent(EdkReleaseVersion.Comments.GetHeaderComments(),
                                           Name,
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 53..60
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 72..79
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 81..88
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 90..97
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 99..106
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 108..115

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

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

    def _GetLibraryClass(self):
        if self._LibraryClass == None:
            if self._Header_ == None:
                self._GetHeaderInfo()
            if self._LibraryClass == None:
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 6 other locations - About 2 hrs to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 427..433
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 436..442
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1956..1962
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1965..1971
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1974..1980
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1983..1989

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

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

    if PciVendorId != None:
        Name = DT.TAB_INF_DEFINES_PCI_VENDOR_ID
        Value = PciVendorId.GetValue()
        Statement = _GenInfDefineStateMent(PciVendorId.Comments.GetHeaderComments(),
                                           Name,
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 44..51
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 53..60
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 81..88
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 90..97
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 99..106
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 108..115

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

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

    if PciRevision != None:
        Name = DT.TAB_INF_DEFINES_PCI_REVISION
        Value = PciRevision.GetValue()
        Statement = _GenInfDefineStateMent(PciRevision.Comments.GetHeaderComments(),
                                           Name,
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 44..51
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 53..60
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 72..79
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 81..88
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 90..97
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 108..115

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

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

    def _GetISOLanguages(self):
        if self._ISOLanguages == None:
            if self._Header == None:
                self._GetHeaderInfo()
            if self._ISOLanguages == None:
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 6 other locations - About 2 hrs to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 427..433
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1947..1953
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1956..1962
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1965..1971
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1974..1980
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1983..1989

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

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

    if PciClassCode != None:
        Name = DT.TAB_INF_DEFINES_PCI_CLASS_CODE
        Value = PciClassCode.GetValue()
        Statement = _GenInfDefineStateMent(PciClassCode.Comments.GetHeaderComments(),
                                           Name,
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 44..51
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 53..60
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 72..79
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 81..88
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 99..106
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 108..115

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

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

    if PciCompress != None:
        Name = DT.TAB_INF_DEFINES_PCI_COMPRESS
        Value = PciCompress.GetValue()
        Statement = _GenInfDefineStateMent(PciCompress.Comments.GetHeaderComments(),
                                           Name,
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 44..51
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 53..60
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 72..79
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 81..88
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 90..97
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 99..106

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

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

    if Shadow != None:
        Name = DT.TAB_INF_DEFINES_SHADOW
        Value = Shadow.GetValue()
        Statement = _GenInfDefineStateMent(Shadow.Comments.GetHeaderComments(),
                                           Name,
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 44..51
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 72..79
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 81..88
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 90..97
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 99..106
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py on lines 108..115

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

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

    def _GetConstructor(self):
        if self._ConstructorList == None:
            if self._Header_ == None:
                self._GetHeaderInfo()
            if self._ConstructorList == None:
Severity: Major
Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py and 6 other locations - About 2 hrs to fix
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 427..433
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 436..442
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1947..1953
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1956..1962
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1965..1971
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py on lines 1983..1989

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

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