aureooms/js-oro

View on GitHub

Showing 9 of 13 total issues

Function base has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
Open

var base = function(A, m, n) {
    var i, j, g, f, swap, Ai, Aij, Ah, Af, Afj;


    l : for (j = 0; j < m; ++j) {
Severity: Minor
Found in js/src/simplex/base.js - About 5 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 simplex has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

var simplex = function(A, m, n) {
    var i, j, Am, Ah, Ahbo, Af, Afj, no, na, bo, ba, Ambo, k;

    Am = A[m];

Severity: Minor
Found in js/src/simplex/simplex.js - About 4 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 normalize_t has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

var normalize_t = function(fn){

    var normalize = function(A, m, n) {
        var swap, i, j, Ai, Ak, Am, k = n - 1;

Severity: Minor
Found in js/src/simplex/normalize.js - About 2 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 simplex has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var simplex = function(A, m, n) {
    var i, j, Am, Ah, Ahbo, Af, Afj, no, na, bo, ba, Ambo, k;

    Am = A[m];

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

    Function base has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var base = function(A, m, n) {
        var i, j, g, f, swap, Ai, Aij, Ah, Af, Afj;
    
    
        l : for (j = 0; j < m; ++j) {
    Severity: Minor
    Found in js/src/simplex/base.js - About 1 hr to fix

      Avoid deeply nested control flow statements.
      Open

                          for (  ++g; g <= n; ++g) Af[g] -= Afj * Ah[g];
      Severity: Major
      Found in js/src/simplex/base.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            for (g = 0; g  < j; ++g) Af[g] -= Afj * Ah[g];
        Severity: Major
        Found in js/src/simplex/base.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              for (  ++g; g <= n; ++g) Af[g] -= Afj * Ah[g];
          Severity: Major
          Found in js/src/simplex/base.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                for (g = 0; g  < j; ++g) Af[g] -= Afj * Ah[g];
            Severity: Major
            Found in js/src/simplex/base.js - About 45 mins to fix
              Severity
              Category
              Status
              Source
              Language