Showing 9,525 of 13,510 total issues
Function link_shared_lib
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def link_shared_lib(self, objects, output_libname, output_dir=None,
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function testfile
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def testfile(filename, module_relative=True, name=None, package=None,
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Function dump
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def dump(obj, fp, skipkeys=False, ensure_ascii=True, check_circular=True,
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function link_shared_object
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def link_shared_object(self, objects, output_filename, output_dir=None,
Function link_shared_lib
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def link_shared_lib(self, objects, output_libname, output_dir=None,
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function CreateAsBuiltInf
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
def CreateAsBuiltInf(self):
if self.IsAsBuiltInfCreated:
return
# Skip the following code for EDK I inf
Method Encode
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public void Encode(SevenZip.Compression.RangeCoder.Encoder rangeEncoder, int symbol, int posState) throws IOException
{
if (symbol < Base.kNumLowLenSymbols)
{
rangeEncoder.Encode(_choice, 0, 0);
- 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 ParseSwitch
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
boolean ParseSwitch(String s)
{
if (s.startsWith("d"))
{
DictionarySize = 1 << Integer.parseInt(s.substring(1));
- 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 InsertConditionalStatement
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def InsertConditionalStatement(self, Filename, FileID, BelongsToItem, IfDefList, EndLine, ArchList):
(Value1, Value2, Value3, Model, StartColumn, EndColumn, Enabled) = ('', '', '', -1, -1, -1, 0)
if IfDefList == []:
ErrorMsg = 'Not suited conditional statement in file %s' % Filename
EdkLogger.error("DSC File Parser", PARSER_ERROR, ErrorMsg, Filename, RaiseError=EdkLogger.IsRaiseError)
- 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 __GetStringData
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def __GetStringData(self):
if self.__Token.startswith("\"") or self.__Token.startswith("L\""):
self.__UndoToken()
self.__SkipToToken("\"")
currentLineNumber = self.CurrentLineNumber
- 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 __GetTokenStatements
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def __GetTokenStatements(self, Obj):
if not self.__IsKeyword( "BaseAddress"):
raise Warning("BaseAddress missing At Line ", self.FileName, self.CurrentLineNumber)
if not self.__IsToken( "="):
- 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 __GetReferencedFdFvTupleFromSection
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def __GetReferencedFdFvTupleFromSection(self, FfsFile, FdList = [], FvList = []):
SectionStack = []
SectionStack.extend(FfsFile.SectionList)
while SectionStack != []:
- 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 GenBuildOptions
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def GenBuildOptions(self, ContainerFile):
EdkLogger.debug(2, "Generate %s ..." % TAB_BUILD_OPTIONS)
BuildOptions = {}
#
# Get all BuildOptions
- 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 UpdateLibraryClassOfModule
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def UpdateLibraryClassOfModule(self, InfFileName, LibraryClass, Arch, InstanceFilePath):
#
# Update the library instance itself to add this libraryclass name
#
LibraryModule = self.InfDatabase[InstanceFilePath].Module
- 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 Add
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def Add(self, Vpd, Offset):
if (Vpd == None):
EdkLogger.error("VpdInfoFile", BuildToolError.ATTRIBUTE_UNKNOWN_ERROR, "Invalid VPD PCD entry.")
if not (Offset >= 0 or Offset == "*"):
- 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 _GetOperator
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _GetOperator(self):
self.__SkipWS()
LegalOpLst = ['&&', '||', '!=', '==', '>=', '<='] + self.NonLetterOpLst
self._Token = ''
- 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"