hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Avoid deeply nested control flow statements.
Open

                        if Node in Constructor:
                            continue
                        # remove edge e from the graph if Node has no constructor
                        ConsumedByList[Item].remove(Node)
Severity: Major
Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if PcdValue[0] == 'L':
                                Unicode = True
                            PcdValue = PcdValue.lstrip('L')
    Severity: Major
    Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if DepexExpressionList != '':
                                  DepexExpressionList += ' AND '
                              DepexExpressionList += '('
      Severity: Major
      Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if Key in self.Module.Pcds or Key in Pcds:
                                    continue
                                Pcds[Key] = copy.copy(Library.Pcds[Key])
        Severity: Major
        Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if ArraySize < (len(PcdValue) + 1):
                                      EdkLogger.error("build", AUTOGEN_ERROR,
                                                      "The maximum size of VOID* type PCD '%s.%s' is less than its actual size occupied." % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName)
                                                      )
                                  if ArraySize > len(PcdValue) + 1:
          Severity: Major
          Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                if Pcd.DatumType == "UINT64":
                                    Dict['VARDEF_VALUE_'+Pcd.DatumType].append(Sku.HiiDefaultValue + "ULL")
                                elif Pcd.DatumType in ("UINT32", "UINT16", "UINT8"):
                                    Dict['VARDEF_VALUE_'+Pcd.DatumType].append(Sku.HiiDefaultValue + "U")
                                elif Pcd.DatumType == "BOOLEAN":
            Severity: Major
            Found in BaseTools/Source/Python/AutoGen/GenPcdDb.py - About 45 mins to fix

              Function GetVarInfo has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def GetVarInfo(PredVarList, FuncRecord, FullFileName, IsFuncCall=False, TargetType=None, StarList=None):
              Severity: Minor
              Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        for Pcd in self._DynamicPcdList:
                                            # just pick the a value to determine whether is unicode string type
                                            i = 0
                                            for (SkuName,Sku) in Pcd.SkuInfoList.items():                        
                                                if Sku.VpdOffset == "*":
                Severity: Major
                Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          for ValueSameCount in range(RemainPcdListLength):
                                              if PcdList[len(PcdList) - RemainPcdListLength + ValueSameCount].TokenValue == Item.TokenValue:
                                                  SameTokenValuePcdList.append(PcdList[len(PcdList) - RemainPcdListLength + ValueSameCount])
                                              else:
                                                  break;
                  Severity: Major
                  Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if not NeedProcessVpdMapFile and Sku.VpdOffset == "*":
                                                NeedProcessVpdMapFile = True
                                                if self.Platform.VpdToolGuid == None or self.Platform.VpdToolGuid == '':
                                                    EdkLogger.error("Build", FILE_NOT_FOUND, \
                                                                    "Fail to find third-party BPDG tool to process VPD PCDs. BPDG Guid tool need to be defined in tools_def.txt and VPD_TOOL_GUID need to be provided in DSC file.")
                    Severity: Major
                    Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              if DepexList != []:
                                                  DepexList.append('AND')
                                              DepexList.append('(')
                      Severity: Major
                      Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 45 mins to fix

                        Function Insert has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def Insert(self, ErrorID, OtherMsg = '', BelongsToTable = '', BelongsToItem = -1, Enabled = 0, Corrected = -1):
                        Severity: Minor
                        Found in BaseTools/Source/Python/Table/TableReport.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              for Star in StarList:
                                                  Type = Type.strip()
                                                  Type = Type.rstrip(Star)
                                              # Get real type after de-reference pointers.
                                              if len(Type.strip()) == 0:
                          Severity: Major
                          Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if Tool not in BuildOptions:
                                                        BuildOptions[Tool] = {}
                                                    if Attr != "FLAGS" or Attr not in BuildOptions[Tool]:
                            Severity: Major
                            Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if Attr != "FLAGS" or Attr not in BuildOptions[Tool]:
                                                          BuildOptions[Tool][Attr] = Options[Key]
                                                      else:
                                                          # append options for the same tool
                                                          BuildOptions[Tool][Attr] += " " + Options[Key]
                              Severity: Major
                              Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                        if (Path not in self.IncludePathList) and (CommonPath([Path, self.MetaFile.Dir]) != self.MetaFile.Dir):
                                                            ErrMsg = "The include directory for the EDK II module in this line is invalid %s specified in %s FLAGS '%s'" % (Path, Tool, FlagOption) 
                                                            EdkLogger.error("build", 
                                                                            PARAMETER_INVALID,
                                                                            ExtraData = ErrMsg, 
                                Severity: Major
                                Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                      if Unicode:
                                                          NewValue = NewValue + str(ord(Value[Index]) % 0x10000) + ', '
                                                      else:
                                                          NewValue = NewValue + str(ord(Value[Index]) % 0x100) + ', '
                                                  if Unicode:
                                  Severity: Major
                                  Found in BaseTools/Source/Python/AutoGen/GenC.py - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                        for SkuName in Pcd.SkuInfoList:
                                                            SkuInfo = Pcd.SkuInfoList[SkuName]
                                                            if SkuInfo.SkuId == None or SkuInfo.SkuId == '':
                                                                continue
                                                            VariableNameStructure = StringToArray(SkuInfo.VariableName)
                                    Severity: Major
                                    Found in BaseTools/Source/Python/AutoGen/GenPcdDb.py - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                          if StringTabLen % 2:
                                                              StringTabLen += 1
                                                          if Sku.VpdOffset == '':
                                      Severity: Major
                                      Found in BaseTools/Source/Python/AutoGen/GenPcdDb.py - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                if not FoundFlag :
                                                                    # just pick the a value to determine whether is unicode string type
                                                                    for (SkuName,Sku) in DscPcdEntry.SkuInfoList.items():
                                                                        Sku.VpdOffset = Sku.VpdOffset.strip() 
                                                                        
                                        Severity: Major
                                        Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language