aureooms/js-merging

View on GitHub

Showing 10 of 12 total issues

Function iterables has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

export function* iterables ( compare , A , B ) {

    A = A[Symbol.iterator]( ) ;
    B = B[Symbol.iterator]( ) ;

Severity: Minor
Found in src/iterable/iterables.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 _hlstatic has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

export function _hlstatic ( binarysearch , copy ) {

    /**
     * Merges 2 arrays using the Hwang Lin algorithm.
     *
Severity: Minor
Found in src/array/_hlstatic.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 iterables has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function* iterables ( compare , A , B ) {

    A = A[Symbol.iterator]( ) ;
    B = B[Symbol.iterator]( ) ;

Severity: Minor
Found in src/iterable/iterables.js - About 1 hr to fix

    Function tapemerge has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    export function tapemerge ( compare , a , ai , aj , b , bi , bj , c , ci ) {
    Severity: Major
    Found in src/array/tapemerge.js - About 1 hr to fix

      Function hwanglin has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          let hwanglin = function ( compare , a , ai , aj , b , bi , bj , c , ci ) {
      Severity: Major
      Found in src/array/_hlstatic.js - About 1 hr to fix

        Function merge has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            let merge = function ( compare, a, ai, aj, b, bi, bj, c, ci ) {
        Severity: Major
        Found in src/array/_merge.js - About 1 hr to fix

          Function _hlstatic has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function _hlstatic ( binarysearch , copy ) {
          
              /**
               * Merges 2 arrays using the Hwang Lin algorithm.
               *
          Severity: Minor
          Found in src/array/_hlstatic.js - About 1 hr to fix

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

            export function nodes ( compare , A , m , B , n ) {
            Severity: Minor
            Found in src/nodes/nodes.js - About 35 mins to fix

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

              export function nodes ( compare , A , m , B , n ) {
              
                  if ( m <= 0 ) return B ;
                  if ( n <= 0 ) return A ;
              
              
              Severity: Minor
              Found in src/nodes/nodes.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 tapemerge has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              export function tapemerge ( compare , a , ai , aj , b , bi , bj , c , ci ) {
              
                  var cj ;
              
                  cj = ci + aj - ai + bj - bi ;
              Severity: Minor
              Found in src/array/tapemerge.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