sjsyrek/maryamyriameliamurphies.js

View on GitHub

Showing 47 of 84 total issues

Function mergeSortBy has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
Open

export const mergeSortBy = (cmp, as) => {
  const mergeSortBy_ = (cmp, as) => {
    if (isList(as) === false) { return error.listError(as, mergeSortBy); }
    const sequences = as => {
      if (isEmpty(as)) { return list(as); }
Severity: Minor
Found in source/list/ordering.js - About 6 hrs 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 mergeSortBy has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const mergeSortBy = (cmp, as) => {
  const mergeSortBy_ = (cmp, as) => {
    if (isList(as) === false) { return error.listError(as, mergeSortBy); }
    const sequences = as => {
      if (isEmpty(as)) { return list(as); }
Severity: Major
Found in source/list/ordering.js - About 2 hrs to fix

    Function mergeSortBy_ has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const mergeSortBy_ = (cmp, as) => {
        if (isList(as) === false) { return error.listError(as, mergeSortBy); }
        const sequences = as => {
          if (isEmpty(as)) { return list(as); }
          let xs = tail(as);
    Severity: Minor
    Found in source/list/ordering.js - About 2 hrs to fix

      Function compare has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

      export const compare = (a, b) => {
        const compare_ = (a, b) => {
          if (a === Infinity) { return GT; }
          if (b === Infinity) { return LT; }
          if (typeCheck(a, b)) {
      Severity: Minor
      Found in source/ord.js - About 1 hr 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 listRangeLazyBy has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

      export const listRangeLazyBy = (start, end, step) => {
        const listRangeLazyBy_ = (start, end, step) => {
          if (start === end) { return list(start); }
          if (greaterThan(start, end)) { return emptyList; }
          let x = start;
      Severity: Minor
      Found in source/list/func.js - About 1 hr 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 cycle has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

      export const cycle = as => {
        if (isList(as) === false) { return error.listError(as, cycle); }
        if (isEmpty(as)) { return error.emptyList(as, cycle); }
        let x = head(as);
        let xs = tail(as);
      Severity: Minor
      Found in source/list/inf.js - About 1 hr 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 listAppend has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      export const listAppend = (xs, ys) => {
        const listAppend_ = (xs, ys) => {
          if (isList(xs) === false ) { return error.listError(xs, listAppend); }
          if (isList(ys) === false ) { return error.listError(ys, listAppend); }
          if (isEmpty(xs)) { return ys; }
      Severity: Minor
      Found in source/list/func.js - About 1 hr 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 zip3 has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

      export const zip3 = (as, bs, cs) => {
        const zip3_ = (as, bs, cs) => {
          if (isList(as) === false) { return error.listError(as, zip3); }
          if (isList(bs) === false) { return error.listError(bs, zip3); }
          if (isList(cs) === false) { return error.listError(cs, zip3); }
      Severity: Minor
      Found in source/list/zip.js - About 1 hr 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 filter has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

      export const filter = (f, as) => {
        const filter_ = (f, as) => {
          if (isList(as) === false ) { return error.listError(as, filter); }
          if (isEmpty(as)) { return emptyList; }
          const x = head(as);
      Severity: Minor
      Found in source/list/searching.js - About 1 hr 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 zip has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      export const zip = (as, bs) => {
        const zip_ = (as, bs) => {
          if (isList(as) === false) { return error.listError(as, zip); }
          if (isList(bs) === false) { return error.listError(bs, zip); }
          if (isEmpty(as)) { return emptyList; }
      Severity: Minor
      Found in source/list/zip.js - About 55 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 zipWith3 has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      export const zipWith3 = (f, as, bs, cs) => {
        const zipWith3_ = (f, as, bs, cs) => {
          if (isList(as) === false) { return error.listError(as, zipWith3); }
          if (isList(bs) === false) { return error.listError(bs, zipWith3); }
          if (isList(cs) === false) { return error.listError(cs, zipWith3); }
      Severity: Minor
      Found in source/list/zip.js - About 55 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 index has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      export const index = (as, n) => {
        const index_ = (as, n) => {
          if (isList(as) === false ) { return error.listError(as, index); }
          if (n < 0) { return error.rangeError(n, index); }
          if (isEmpty(as)) { return error.rangeError(n, index); }
      Severity: Minor
      Found in source/list/indexing.js - About 55 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 listRange has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      export const listRange = (start, end, f, filt) => {
       const listRange_ = (start, end) => {
         if (f === undefined) { f = x => x + 1; }
         let lst = emptyList;
         const p = x => x >= end;
      Severity: Minor
      Found in source/list/func.js - About 55 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 takeWhile has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      export const takeWhile = (p, as) => {
        const takeWhile_ = (p, as) => {
          if (isList(as) === false) { return error.listError(as, takeWhile); }
          if (isEmpty(as)) { return emptyList; }
          const x = head(as);
      Severity: Minor
      Found in source/list/sub.js - About 55 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 dropWhile has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      export const dropWhile = (p, as) => {
        const dropWhile_ = (p, as) => {
          if (isList(as) === false) { return error.listError(as, dropWhile); }
          if (isEmpty(as)) { return emptyList; }
          const x = head(as);
      Severity: Minor
      Found in source/list/sub.js - About 55 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 stripPrefix has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      export const stripPrefix = (as, bs) => {
        const stripPrefix_ = (as, bs) => {
          if (isList(as) === false) { return error.listError(as, stripPrefix); }
          if (isList(bs) === false) { return error.listError(bs, stripPrefix); }
          if (isEmpty(as)) { return just(bs); }
      Severity: Minor
      Found in source/list/sub.js - About 55 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 mapMaybe has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      export const mapMaybe = (f, as) => {
        const mapMaybe_ = (f, as) => {
          if (isList(as) === false) { return error.listError(as, mapMaybe); }
          if (isEmpty(as)) { return emptyList; }
          const x = head(as);
      Severity: Minor
      Found in source/maybe/func.js - About 45 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 zipWith has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      export const zipWith = (f, as, bs) => {
        const zipWith_ = (f, as, bs) => {
          if (isList(as) === false) { return error.listError(as, zipWith); }
          if (isList(bs) === false) { return error.listError(bs, zipWith); }
          if (isEmpty(as) || isEmpty(bs)) { return emptyList; }
      Severity: Minor
      Found in source/list/zip.js - About 45 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 intersperse has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      export const intersperse = (sep, as) => {
        const intersperse_ = (sep, as) => {
          if (isList(as) === false) { return error.listError(as, intersperse); }
          if (isEmpty(as)) { return emptyList; }
          if (typeCheck(sep, head(as)) === false) {
      Severity: Minor
      Found in source/list/trans.js - About 45 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 take has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      export const take = (n, as) => {
        const take_ = (n, as) => {
          if (isList(as) === false) { return error.listError(as, take); }
          if (n <= 0) { return emptyList; }
          if (isEmpty(as)) { return emptyList; }
      Severity: Minor
      Found in source/list/sub.js - About 35 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