hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function GenModuleFileList has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def GenModuleFileList(self, ContainerFile):        
        ModuleFileList = []
        ContainerFileName = os.path.basename(ContainerFile)
        ContainerFilePath = os.path.dirname(ContainerFile)
        for Item in GetFiles(ContainerFilePath, 
Severity: Minor
Found in BaseTools/Source/Python/UPT/PomAdapter/DecPomAlignment.py - About 35 mins 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 GenLibraries has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def GenLibraries(self, ContainerFile):
        EdkLogger.debug(2, "Generate %s ..." % TAB_LIBRARIES)
        Libraries = sdict()
        #
        # Get all Includes
Severity: Minor
Found in BaseTools/Source/Python/Common/InfClassObject.py - About 35 mins 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 FromXml2 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def FromXml2(self, Item, Key):
        if Item is None:
            return None

        NewItem = XmlNode(Item, '%s/Header' % Key)
Severity: Minor
Found in BaseTools/Source/Python/UPT/Xml/CommonXml.py - About 35 mins 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 ShowPackage has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def ShowPackage(self):
        M = self.Package
        for Arch in M.Header.keys():
            print '\nArch =', Arch
            print 'Filename =', M.Header[Arch].FileName
Severity: Minor
Found in BaseTools/Source/Python/Common/DecClassObject.py - About 35 mins 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 GenIncludes has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def GenIncludes(self, ContainerFile):
        EdkLogger.debug(2, "Generate %s ..." % TAB_INCLUDES)
        Includes = sdict()
        #
        # Get all Includes
Severity: Minor
Found in BaseTools/Source/Python/Common/InfClassObject.py - About 35 mins 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 FromXml has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def FromXml(self, Item, Key):
        if not Item:
            return None
        self.Header.FromXml(Item, Key)
        NewItem = XmlNode(Item, '%s/Header' % Key)
Severity: Minor
Found in BaseTools/Source/Python/UPT/Xml/CommonXml.py - About 35 mins 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 LoadFdfFile has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def LoadFdfFile(self, Filename):     
        FileList = []
        #
        # Parse Fdf file
        #
Severity: Minor
Found in BaseTools/Source/Python/Common/FdfClassObject.py - About 35 mins 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 __GetNList has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def __GetNList(self, InArray=False):
        self._GetSingleToken()
        if not self.__IsHexLiteral():
            if InArray:
                raise BadExpression(ERR_ARRAY_ELE % self._Token)
Severity: Minor
Found in BaseTools/Source/Python/Common/Expression.py - About 35 mins 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 TransferDict has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def TransferDict(OrigDict):
    NewDict = {}

    for Statement, SortedArch in OrigDict:
        Comment = OrigDict[Statement, SortedArch]
Severity: Minor
Found in BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py - About 35 mins 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 GetRePkgDict has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def GetRePkgDict(self):
        SqlCommand = """select * from %s """ % (self.DpTable)
        self.Cur.execute(SqlCommand)
        
        DpInfoList = []
Severity: Minor
Found in BaseTools/Source/Python/UPT/Core/IpiDb.py - About 35 mins 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 FromXml2 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def FromXml2(self, Item, Module):
        if self.Module:
            pass
        #
        # PeiDepex
Severity: Minor
Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py - About 35 mins 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 FromXml has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def FromXml(self, Filename=None):
        if Filename != None:
            self.DistP = DistributionPackageClass()
            #
            # Load to XML
Severity: Minor
Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py - About 35 mins 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 CreateToolsXml has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def CreateToolsXml(Map, Root, Tag):
    #
    # Check if all elements in this section are empty
    #
    for Key in Map:
Severity: Minor
Found in BaseTools/Source/Python/UPT/Xml/IniToXml.py - About 35 mins 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 ParseGenericComment has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def ParseGenericComment (GenericComment, ContainerFile=None, SkipTag=None):
    if ContainerFile:
        pass
    HelpTxt = None         
    HelpStr = '' 
Severity: Minor
Found in BaseTools/Source/Python/UPT/Library/CommentParsing.py - About 35 mins 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 IsValidBuildOptionName has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def IsValidBuildOptionName(BuildOptionName):
    if not BuildOptionName:
        return False
    
    ToolOptionList = GetSplitValueList(BuildOptionName, '_', 4)
Severity: Minor
Found in BaseTools/Source/Python/UPT/Library/ParserValidate.py - About 35 mins 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 IsBinaryInf has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def IsBinaryInf(FileLineList):
    if not FileLineList:
        return False
    
    ReIsSourcesSection = re.compile("^\s*\[Sources.*\]\s.*$", re.IGNORECASE)
Severity: Minor
Found in BaseTools/Source/Python/UPT/Parser/InfParserMisc.py - About 35 mins 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 NormPath has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def NormPath(Path, Defines = None):
    IsRelativePath = False
    if Defines == None:
        Defines = {}
    if Path:
Severity: Minor
Found in BaseTools/Source/Python/UPT/Library/String.py - About 35 mins 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 IsEqualList has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def IsEqualList(ListA, ListB):
    if ListA == ListB:
        return True

    for ItemA in ListA:
Severity: Minor
Found in BaseTools/Source/Python/UPT/Library/Misc.py - About 35 mins 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 __HexDigit has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def __HexDigit(TempChar):
    if (TempChar >= 'a' and TempChar <= 'f') or \
    (TempChar >= 'A' and TempChar <= 'F') \
            or (TempChar >= '0' and TempChar <= '9'):
        return True
Severity: Minor
Found in BaseTools/Source/Python/UPT/Library/ParserValidate.py - About 35 mins 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 CleanString2 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def CleanString2(Line, CommentCharacter=DataType.TAB_COMMENT_SPLIT, AllowCppStyleComment=False):
    #
    # remove whitespace
    #
    Line = Line.strip()
Severity: Minor
Found in BaseTools/Source/Python/UPT/Library/String.py - About 35 mins 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