hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function _reconstruct has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

def _reconstruct(x, info, deep, memo=None):
    if isinstance(info, str):
        return x
    assert isinstance(info, tuple)
    if memo is None:
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/copy.py - About 6 hrs to fix

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 get_config_vars has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

def get_config_vars(*args):
    """With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  On Unix, this means every variable defined in Python's
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/sysconfig.py - About 6 hrs to fix

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 link has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    def link (self,
              target_desc,
              objects,
              output_filename,
              output_dir=None,
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/bcppcompiler.py - About 6 hrs to fix

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 com_assign has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    def com_assign(self, node, assigning):
        # return a node suitable for use as an "lvalue"
        # loop to avoid trivial recursion
        while 1:
            t = node[0]
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/transformer.py - About 6 hrs to fix

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 readline has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    def readline(self, size=None, keepends=True):

        """ Read one line from the input stream and return the
            decoded data.
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/codecs.py - About 6 hrs to fix

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 decode_header has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

def decode_header(header):
    """Decode a message header value without converting charset.

    Returns a list of (decoded_string, charset) pairs containing each of the
    decoded parts of the header.  Charset is None for non-encoded parts of the
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/email/header.py - About 6 hrs to fix

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 assertSequenceEqual has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    def assertSequenceEqual(self, seq1, seq2, msg=None, seq_type=None):
        """An equality assertion for ordered sequences (like lists and tuples).

        For the purposes of this function, a valid ordered sequence type is one
        which can be indexed, has a length, and has an equality operator.
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/unittest/case.py - About 6 hrs to fix

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 _clone_node has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

def _clone_node(node, deep, newOwnerDocument):
    """
    Clone a node and give it the new owner document.
    Called by Node.cloneNode and Document.importNode
    """
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/xml/dom/minidom.py - About 6 hrs to fix

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 _reconstruct has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

def _reconstruct(x, info, deep, memo=None):
    if isinstance(info, str):
        return x
    assert isinstance(info, tuple)
    if memo is None:
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/copy.py - About 6 hrs to fix

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 get_config_vars has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

def get_config_vars(*args):
    """With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  On Unix, this means every variable defined in Python's
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/sysconfig.py - About 6 hrs to fix

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 link has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    def link (self,
              target_desc,
              objects,
              output_filename,
              output_dir=None,
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/bcppcompiler.py - About 6 hrs to fix

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 com_assign has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    def com_assign(self, node, assigning):
        # return a node suitable for use as an "lvalue"
        # loop to avoid trivial recursion
        while 1:
            t = node[0]
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/compiler/transformer.py - About 6 hrs to fix

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 readline has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    def readline(self, size=None, keepends=True):

        """ Read one line from the input stream and return the
            decoded data.
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/codecs.py - About 6 hrs to fix

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

Method CodeOneBlock has 157 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public void CodeOneBlock(out Int64 inSize, out Int64 outSize, out bool finished)
        {
            inSize = 0;
            outSize = 0;
            finished = true;
Severity: Major
Found in vector-uefi/insyde/7zip/CS/7zip/Compress/LZMA/LzmaEncoder.cs - About 6 hrs to fix

    Function LoadDscFile has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
    Open

        def LoadDscFile(self, Filename):
            #
            # Insert a record for file
            #
            Filename = NormPath(Filename)
    Severity: Minor
    Found in BaseTools/Source/Python/Common/DscClassObject.py - About 6 hrs to fix

    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 __init__ has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
    Open

        def __init__(self, ActivePlatform, WorkspaceDir):
            self.WorkspaceDir            = NormPath(WorkspaceDir)
            self.SupArchList             = []
            self.BuildTarget             = []
            self.SkuId                   = ''
    Severity: Minor
    Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 6 hrs to fix

    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 LoadDecFile has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
    Open

        def LoadDecFile(self, Filename):
            #
            # Insert a record for file
            #
            Filename = NormPath(Filename)
    Severity: Minor
    Found in BaseTools/Source/Python/Common/DecClassObject.py - About 6 hrs to fix

    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 GenPcdSections has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
    Open

    def GenPcdSections(ModuleObject):
        Content = ''
        if not GlobalData.gIS_BINARY_INF:
            #
            # for each Pcd Itemtype, maintain a dict so the same type will be grouped 
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py - About 6 hrs to fix

    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 GenFfs has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
    Open

        def GenFfs(self, Dict = {}, FvChildAddr=[], FvParentAddr=None):
            
            if self.NameGuid != None and self.NameGuid.startswith('PCD('):
                PcdValue = GenFdsGlobalVariable.GetPcdValue(self.NameGuid)
                if len(PcdValue) == 0:
    Severity: Minor
    Found in BaseTools/Source/Python/GenFds/FfsFileStatement.py - About 6 hrs to fix

    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 DynExPcdTokenNumberMapping has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
    Open

    def DynExPcdTokenNumberMapping(Info, AutoGenH):
        ExTokenCNameList = []
        PcdExList        = []
        if Info.IsLibrary:
            PcdList = Info.LibraryPcdList
    Severity: Minor
    Found in BaseTools/Source/Python/AutoGen/GenC.py - About 6 hrs to fix

    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

    Severity
    Category
    Status
    Source
    Language