Function yulWalk
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function* yulWalk(
sourceId,
sourceIndex,
node,
pointer,
Function findYulScopePointer
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function findYulScopePointer(node, pointer, base, basePointer) {
//walk upward until we find a YulBlock or YulFunctionDefinition,
//with a special case for YulForLoop
debug("pointer: %s", pointer);
debug("basePointer: %s", basePointer);
- 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 walk
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function* walk(sourceId, sourceIndex, node, pointer = "", parentId = null) {
debug("walking %s %o %o", sourceId, pointer, node);
yield* handleEnter(sourceId, sourceIndex, node, pointer, parentId);
- 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 handleEnter
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function* handleEnter(sourceId, sourceIndex, node, pointer, parentId) {
debug("entering %s %s", sourceId, pointer);
if (!(node instanceof Object)) {
return;
Function handleYulExit
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
sourceId,
sourceIndex,
node,
pointer,
base,
Function yulWalk
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
sourceId,
sourceIndex,
node,
pointer,
base,
Function handleYulEnter
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
sourceId,
sourceIndex,
node,
pointer,
base,
Function yulWalk
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function* yulWalk(
sourceId,
sourceIndex,
node,
pointer,
- 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 walk
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function* walk(sourceId, sourceIndex, node, pointer = "", parentId = null) {
Function handleYul
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function* handleYul(sourceId, sourceIndex, node, pointer, parentId) {
Function handleEnter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function* handleEnter(sourceId, sourceIndex, node, pointer, parentId) {
Avoid too many return
statements within this function. Open
return findYulScopePointer(parent, parentPointer, base, basePointer);