sjsyrek/maryamyriameliamurphies.js

View on GitHub

Showing 84 of 84 total issues

Function concat has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

export const concat = xss => {
  if (isList(xss)) {
    if (isEmpty(xss)) { return emptyList; }
    const x = head(xss);
    const xs = tail(xss);
Severity: Minor
Found in source/list/folds.js - About 25 mins to fix

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 transpose has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

export const transpose = lss => {
  if (isList(lss) === false) { return error.listError(lss, transpose); }
  if (isEmpty(lss)) { return emptyList; }
  const ls = head(lss);
  const xss = tail(lss);
Severity: Minor
Found in source/list/trans.js - About 25 mins to fix

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 and has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

export const and = (a, b) => {
  const and_ = (a, b) => {
    if (typeof a !== `boolean`) { return error.typeError(a, and); }
    if (typeof b !== `boolean`) { return error.typeError(b, and); }
    if (a) { return b; }
Severity: Minor
Found in source/base/bool.js - About 25 mins to fix

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 compare has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  static compare(a, b) {
    if (this.isEq(a, b)) { return EQ; }
    let i = 1;
    while (i in a) {
      if (a[i] < b[i]) { return LT; }
Severity: Minor
Found in source/tuple/tuple.js - About 25 mins to fix

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

Severity
Category
Status
Source
Language