Showing 9,525 of 13,510 total issues
Avoid deeply nested control flow statements. Open
Open
if Node in Constructor:
continue
# remove edge e from the graph if Node has no constructor
ConsumedByList[Item].remove(Node)
Avoid deeply nested control flow statements. Open
Open
if PcdValue[0] == 'L':
Unicode = True
PcdValue = PcdValue.lstrip('L')
Avoid deeply nested control flow statements. Open
Open
if DepexExpressionList != '':
DepexExpressionList += ' AND '
DepexExpressionList += '('
Avoid deeply nested control flow statements. Open
Open
if Key in self.Module.Pcds or Key in Pcds:
continue
Pcds[Key] = copy.copy(Library.Pcds[Key])
Avoid deeply nested control flow statements. Open
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:
Avoid deeply nested control flow statements. Open
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":
Function GetVarInfo
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def GetVarInfo(PredVarList, FuncRecord, FullFileName, IsFuncCall=False, TargetType=None, StarList=None):
Avoid deeply nested control flow statements. Open
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 == "*":
Avoid deeply nested control flow statements. Open
Open
for ValueSameCount in range(RemainPcdListLength):
if PcdList[len(PcdList) - RemainPcdListLength + ValueSameCount].TokenValue == Item.TokenValue:
SameTokenValuePcdList.append(PcdList[len(PcdList) - RemainPcdListLength + ValueSameCount])
else:
break;
Avoid deeply nested control flow statements. Open
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.")
Avoid deeply nested control flow statements. Open
Open
if DepexList != []:
DepexList.append('AND')
DepexList.append('(')
Function Insert
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def Insert(self, ErrorID, OtherMsg = '', BelongsToTable = '', BelongsToItem = -1, Enabled = 0, Corrected = -1):
Avoid deeply nested control flow statements. Open
Open
for Star in StarList:
Type = Type.strip()
Type = Type.rstrip(Star)
# Get real type after de-reference pointers.
if len(Type.strip()) == 0:
Avoid deeply nested control flow statements. Open
Open
if Tool not in BuildOptions:
BuildOptions[Tool] = {}
if Attr != "FLAGS" or Attr not in BuildOptions[Tool]:
Avoid deeply nested control flow statements. Open
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]
Avoid deeply nested control flow statements. Open
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,
Avoid deeply nested control flow statements. Open
Open
if Unicode:
NewValue = NewValue + str(ord(Value[Index]) % 0x10000) + ', '
else:
NewValue = NewValue + str(ord(Value[Index]) % 0x100) + ', '
if Unicode:
Avoid deeply nested control flow statements. Open
Open
for SkuName in Pcd.SkuInfoList:
SkuInfo = Pcd.SkuInfoList[SkuName]
if SkuInfo.SkuId == None or SkuInfo.SkuId == '':
continue
VariableNameStructure = StringToArray(SkuInfo.VariableName)
Avoid deeply nested control flow statements. Open
Open
if StringTabLen % 2:
StringTabLen += 1
if Sku.VpdOffset == '':
Avoid deeply nested control flow statements. Open
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()