Showing 9,525 of 13,510 total issues
ModuleHeaderObject
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class ModuleHeaderObject(IdentificationObject, CommonHeaderObject):
def __init__(self):
self.IsLibrary = False
self.IsLibraryModList = []
self.ModuleType = ''
PcdObject
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class PcdObject(CommonPropertiesObject, HelpTextListObject):
def __init__(self):
self.PcdCName = ''
self.CName = ''
self.Token = ''
ObjectDefinition
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class ObjectDefinition(GeneratorGroup):
"Spit out code that together defines a new Python object type"
basechain = "NULL"
tp_flags = "Py_TPFLAGS_DEFAULT"
basetype = None
Message
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class Message:
"""Represents a single RFC 2822-compliant message."""
def __init__(self, fp, seekable = 1):
"""Initialize the class instance and read the headers."""
Win32Helper
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class Win32Helper:
def __init__(self):
import platform
self.os_system = platform.system()
Message
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class Message:
"""Represents a single RFC 2822-compliant message."""
def __init__(self, fp, seekable = 1):
"""Initialize the class instance and read the headers."""
Method Skip
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void Skip(int num) throws IOException
{
do
{
int lenLimit;
File Decoder.java
has 297 lines of code (exceeds 250 allowed). Consider refactoring. Open
package SevenZip.Compression.LZMA;
import SevenZip.Compression.RangeCoder.BitTreeDecoder;
import SevenZip.Compression.LZMA.Base;
import SevenZip.Compression.LZ.OutWindow;
File charset.py
has 297 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright (C) 2001-2006 Python Software Foundation
# Author: Ben Gertzfield, Barry Warsaw
# Contact: email-sig@python.org
__all__ = [
File charset.py
has 297 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright (C) 2001-2006 Python Software Foundation
# Author: Ben Gertzfield, Barry Warsaw
# Contact: email-sig@python.org
__all__ = [
File CGIHTTPServer.py
has 296 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""CGI-savvy HTTP Server.
This module builds on SimpleHTTPServer by implementing GET and POST
requests to cgi-bin scripts.
File CGIHTTPServer.py
has 296 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""CGI-savvy HTTP Server.
This module builds on SimpleHTTPServer by implementing GET and POST
requests to cgi-bin scripts.
Function CheckPcdDatum
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def CheckPcdDatum(Type, Value):
if Type == "VOID*":
ValueRe = re.compile(r'\s*L?\".*\"\s*$')
if not (((Value.startswith('L"') or Value.startswith('"')) and Value.endswith('"'))
or (Value.startswith('{') and Value.endswith('}'))
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function GenNmakes
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def GenNmakes(self, ContainerFile):
EdkLogger.debug(2, "Generate %s ..." % TAB_NMAKE)
Nmakes = sdict()
#
# Get all Nmakes
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function GenModuleHeaderUserExt
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def GenModuleHeaderUserExt(DefineObj, ArchString):
DefinesDictNew = {}
EdkReleaseVersion = DefineObj.GetEdkReleaseVersion()
Shadow = DefineObj.GetShadow()
DpxSource = DefineObj.GetDpxSource()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function FromXml
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def FromXml(self, Item, Key):
if Key:
pass
#
# Create a package object
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function GenGuidSections
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def GenGuidSections(GuidObjList):
#
# generate [Guids] section
#
Content = ''
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function GenSection
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def GenSection(SectionName, SectionDict, SplitArch=True):
Content = ''
for SectionAttrs in SectionDict:
StatementList = SectionDict[SectionAttrs]
if SectionAttrs and SectionName != 'Defines' and SectionAttrs.strip().upper() != DataType.TAB_ARCH_COMMON:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ValidatePcdValueOnDatumType
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def ValidatePcdValueOnDatumType(Value, Type):
Value = Value.strip()
#
# Boolean type only allow 0x00 or 0x01 as value per INF spec
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function GetBuildRules
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def GetBuildRules(Inf, Arch):
if not Arch:
Arch = 'COMMON'
if not Arch in GenFdsGlobalVariable.OutputDirDict:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"