Showing 9,525 of 13,510 total issues
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, Filename = None, Database = None, SourceFileList = None, SourceOverridePath = None, Edk_Source = None, Efi_Source = None):
Function PrintFragments
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def PrintFragments(self):
print '################# ' + self.FileName + '#####################'
print '/****************************************/'
- 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
Avoid deeply nested control flow statements. 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)
ItemList.append('')
Avoid deeply nested control flow statements. Open
if NextLine[0] == TAB_SECTION_START and NextLine[-1] == TAB_SECTION_END:
self._CurrentLine = NmakeLine + Line[0:-1]
NmakeLine = ''
else:
NmakeLine = NmakeLine + ' ' + Line[0:-1]
Function ParserSource
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def ParserSource(self, CurrentSection, SectionItemList, ArchList, ThirdList):
for Index in range(0, len(ArchList)):
Arch = ArchList[Index]
Third = ThirdList[Index]
if Arch == '':
- 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
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, ModifierStr, DeclStr, Begin, End, LBPos, NamePos):
Function StoreFunctionCalling
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def StoreFunctionCalling(self, StartLine, StartOffset, EndLine, EndOffset, FuncName, ParamList):
Avoid deeply nested control flow statements. Open
for CompressSection in CompressSections.Sections:
if CompressSection.Type == 0x1B:
CouldBeLoaded, DepexString, FileDepex = self.ParseDepex(CompressSection._SubImages[4], 'Ppi')
break
if CompressSection.Type == 0x02:
Function StoreVariableDeclaration
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def StoreVariableDeclaration(self, StartLine, StartOffset, EndLine, EndOffset, ModifierText, DeclText):
Avoid deeply nested control flow statements. Open
while len(Section) > Start:
Guid = GuidStruct.unpack_from(Section[Start : Start + 16])
GuidString = gGuidStringFormat % Guid
Start = Start + 16
if GuidString in self.UnDispatchedFfsDict:
Function StoreTypedefDefinition
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def StoreTypedefDefinition(self, StartLine, StartOffset, EndLine, EndOffset, FromText, ToText):
Function LoadCallbackProtocol
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def LoadCallbackProtocol(self):
IsLoad = True
for Protocol in self.ProtocolList:
for Callback in self.ProtocolList[Protocol][1]:
if Callback[0] not in self.OrderedFfsDict.keys():
- 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
Avoid deeply nested control flow statements. Open
while len(Section) > Start:
Guid = GuidStruct.unpack_from(Section[Start : Start + 16])
GuidString = gGuidStringFormat % Guid
Start = Start + 16
if GuidString in self.UnDispatchedFfsDict:
Avoid deeply nested control flow statements. Open
for CompressSection in CompressSections.Sections:
if CompressSection.Type == 0x13:
IsFoundDepex = True
CouldBeLoaded, DepexString, FileDepex = self.ParseDepex(CompressSection._SubImages[4], 'Protocol')
break
Function storage_class_specifier
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def storage_class_specifier(self, ):
storage_class_specifier_StartIndex = self.input.index()
try:
try:
- 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
Avoid deeply nested control flow statements. Open
if (self.synpred67()) :
alt31 = 1
Avoid deeply nested control flow statements. Open
if (self.synpred67()) :
alt31 = 1
Avoid deeply nested control flow statements. Open
if (self.synpred67()) :
alt31 = 1
Function synpred82_fragment
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def synpred82_fragment(self, ):
# C.g:326:27: ( ',' ( 'OPTIONAL' )? parameter_declaration )
# C.g:326:27: ',' ( 'OPTIONAL' )? parameter_declaration
self.match(self.input, 27, self.FOLLOW_27_in_synpred82974)
if self.failed:
- 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
Avoid deeply nested control flow statements. Open
if (self.synpred67()) :
alt31 = 1