nodef/extra-array

View on GitHub

Showing 43 of 119 total issues

Function rangedBuildReverseMinHeap$ has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

function rangedBuildReverseMinHeap$<T, U=T>(x: T[], i: number, I: number, fc: CompareFunction<T|U>, fm: MapFunction<T, T|U>, fs: SwapFunction<T>): void {
Severity: Minor
Found in src/index.ts - About 45 mins to fix

    Function interleave has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    export function interleave<T>(xs: T[][]): T[] {
      var a = [];
      for (var i=0;; ++i) {
        var n = 0;
        for (var x of xs)
    Severity: Minor
    Found in src/index.ts - 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 copy$ has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    export function copy$<T>(x: T[], y: T[], j: number=0, i: number=0, I: number=y.length): T[] {
    Severity: Minor
    Found in src/index.ts - About 35 mins to fix

      Function flatTo$ has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function flatTo$(a: any[], x: any[], n: number, fm: MapFunction<any, any>, ft: TestFunction<any>): any[] {
      Severity: Minor
      Found in src/index.ts - About 35 mins to fix

        Function swapRanges$ has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        export function swapRanges$<T>(x: T[], i: number, I: number, j: number, J: number): T[] {
        Severity: Minor
        Found in src/index.ts - About 35 mins to fix

          Function copy has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          export function copy<T>(x: T[], y: T[], j: number=0, i: number=0, I: number=y.length): T[] {
          Severity: Minor
          Found in src/index.ts - About 35 mins to fix

            Function isInfixAt has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            function isInfixAt<T, U=T>(x: T[], y: T[], i: number, fc: CompareFunction<T|U>, fm: MapFunction<T, T|U>): boolean {
            Severity: Minor
            Found in src/index.ts - About 35 mins to fix

              Function swapRanges has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              export function swapRanges<T>(x: T[], i: number, I: number, j: number, J: number): T[] {
              Severity: Minor
              Found in src/index.ts - About 35 mins to fix

                Function partialSort has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                export function partialSort<T, U=T>(x: T[], n: number, fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null, fs: SwapFunction<T> | null=null): T[] {
                Severity: Minor
                Found in src/index.ts - About 35 mins to fix

                  Function partialSort$ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  export function partialSort$<T, U=T>(x: T[], n: number, fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null, fs: SwapFunction<T> | null=null): T[] {
                  Severity: Minor
                  Found in src/index.ts - About 35 mins to fix

                    Function searchSubsequence has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export function searchSubsequence<T, U=T>(x: T[], y: T[], fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null): number {
                      var fc = fc || COMPARE;
                      var fm = fm || IDENTITY;
                      var y1 = [...y].map(fm), Y = y1.length;
                      var a = -1, i = -1, j = 0;
                    Severity: Minor
                    Found in src/index.ts - 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

                    Function unionDual$ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function unionDual$<T, U=T>(x: T[], y: T[], fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null): T[] {
                      var fc = fc || COMPARE;
                      var fm = fm || IDENTITY;
                      var x1 = x.map(fm), i = -1;
                      y: for (var vy of y) {
                    Severity: Minor
                    Found in src/index.ts - 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

                    Function intersectionDual has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function intersectionDual<T, U=T>(x: T[], y: T[], fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null): T[] {
                      var fc = fc || COMPARE;
                      var fm = fm || IDENTITY;
                      var y1 = [...y].map(fm);
                      var i  = -1, a = [];
                    Severity: Minor
                    Found in src/index.ts - 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

                    Function rangeEntries has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export function rangeEntries<T, U=T>(x: T[], fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null): [[number, T], [number, T]] {
                      var fc = fc || COMPARE;
                      var fm = fm || IDENTITY;
                      var X  = x.length;
                      if (X===0) return [[-1, undefined], [-1, undefined]];
                    Severity: Minor
                    Found in src/index.ts - 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

                    Function uniqueDual has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function uniqueDual<T, U=T>(x: T[], fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null): T[] {
                      var fc = fc || COMPARE;
                      var fm = fm || IDENTITY;
                      var i  = -1, s = [], a = [];
                      x: for (var vx of x) {
                    Severity: Minor
                    Found in src/index.ts - 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

                    Function differenceDual has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function differenceDual<T, U=T>(x: T[], y: T[], fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null): T[] {
                      var fc = fc || COMPARE;
                      var fm = fm || IDENTITY;
                      var y1 = [...y].map(fm);
                      var i  = -1, a  = [];
                    Severity: Minor
                    Found in src/index.ts - 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

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

                    export function intermix<T>(x: T[], y: T[], m: number=1, n: number=1, s: number=m, t: number=n): T[] {
                      var X = x.length, Y = y.length, a = [];
                      var m = Math.max(m, 0);
                      var n = Math.max(n, 0);
                      var s = Math.max(s, 1);
                    Severity: Minor
                    Found in src/index.ts - 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 generateWiki has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function generateWiki(ds) {
                      var rkind = /namespace|function/i, useWiki = true;
                      var dm = new Map(ds.map(d => [d.name, d]));
                      for (var d of ds) {
                        var f = `wiki/${d.name}.md`;
                    Severity: Minor
                    Found in build.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 isUniqueDual has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function isUniqueDual<T, U=T>(x: T[], fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null): boolean {
                      var fc = fc || COMPARE;
                      var fm = fm || IDENTITY;
                      var x1 = [...x].map(fm);
                      for (var wx of x1) {
                    Severity: Minor
                    Found in src/index.ts - 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 rangedPartialSelectionSort$ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function rangedPartialSelectionSort$<T, U=T>(x: T[], i: number, I: number, n: number, fc: CompareFunction<T|U>, fm: MapFunction<T, T|U>, fs: SwapFunction<T>): T[] {
                      for (var j=i; n>0 && j<I; ++j, --n) {
                        var l  = j;
                        var wl = fm(x[l], l, x);
                        for (var k=j+1; k<I; ++k) {
                    Severity: Minor
                    Found in src/index.ts - 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