Showing 9,525 of 13,510 total issues
Function __new__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __new__(cls, encode, decode, streamreader=None, streamwriter=None,
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self,
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self,
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self,
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, host='', user='', passwd='', acct='', keyfile=None,
Avoid deeply nested control flow statements. Open
Open
if len(List) == 2:
LibName = List[0]
LibIns = List[1]
else:
LibName = List[0]
Avoid deeply nested control flow statements. Open
Open
if CleanString(NewItem) == '':
continue
(TokenName, TokenGuidCName, Value, Type) = GetFeatureFlagPcd(NewItem, Type, Filename, -1)
Function InsertConditionalStatement
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def InsertConditionalStatement(self, Filename, FileID, BelongsToItem, IfDefList, EndLine, ArchList):
Avoid deeply nested control flow statements. Open
Open
if ItemList[1] != '' and ItemList[1].upper() not in ARCH_LIST_FULL:
EdkLogger.error("Parser", PARSER_ERROR, "Invalid Arch definition '%s' found" % ItemList[1], File=Filename, Line=LineNo, RaiseError=EdkLogger.IsRaiseError)
ArchList.append(ItemList[1].upper())
Avoid deeply nested control flow statements. Open
Open
while (lenEnd < cur + offset)
_optimum[++lenEnd].Price = kIfinityPrice;
Avoid deeply nested control flow statements. Open
Open
if CleanString(NewItem) == '':
continue
List = GetSplitValueList(NewItem)
Avoid deeply nested control flow statements. Open
Open
if CleanString(NewItem) == '':
continue
(K1, K2, K3, K4, K5, K6, K7, K8) = GetDynamicHiiPcd(NewItem, Type, Filename, -1)
Avoid deeply nested control flow statements. Open
Open
for NewComponent in NewItems:
MergeArches(Components, self.GenComponent(NewComponent, Filename), Arch)
Avoid deeply nested control flow statements. Open
Open
if CurrentSection != ItemList[0]:
EdkLogger.error("Parser", PARSER_ERROR, "Different section names '%s' and '%s' are found in one section definition, this is not allowed." % (CurrentSection, ItemList[0]), File=Filename, Line=LineNo, RaiseError=EdkLogger.IsRaiseError)
if CurrentSection.upper() not in self.KeyList:
Avoid deeply nested control flow statements. Open
Open
if (offs == numDistancePairs)
break;
Avoid deeply nested control flow statements. Open
Open
if CleanString(NewItem) == '':
continue
NewItems = []
Avoid deeply nested control flow statements. Open
Open
if len(List) != 2:
RaiseParserError(NewItem, TAB_SKUIDS, Filename, '<Integer>|<UiName>')
else:
self.Platform.SkuInfos.SkuInfoList[List[1]] = List[0]
Avoid deeply nested control flow statements. Open
Open
if CleanString(NewItem) == '':
continue
(K1, K2, K3, K4, K5) = GetDynamicVpdPcd(NewItem, Type, Filename, -1)
Function RunTool
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def RunTool(self, *args, **kwd):
if 'toolName' in kwd: toolName = kwd['toolName']
else: toolName = None
if 'logFile' in kwd: logFile = kwd['logFile']
else: logFile = None
- 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
Method GetTotalRating
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
int dictionarySize,
long elapsedTimeEn, long sizeEn,
long elapsedTimeDe,
long inSizeDe, long outSizeDe)