aureooms/js-gn

View on GitHub

Showing 18 of 22 total issues

Function dense_graph_t has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
Open

export function dense_graph_t(){

    var graph = function(){

        this.pt = [];
Severity: Minor
Found in src/undirected/online/data/dense.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 sparse_graph_t has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
Open

export function sparse_graph_t(){

    /**
     * Object constructor
     *
Severity: Minor
Found in src/undirected/online/data/sparse.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 eventour_t has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

export function eventour_t () {

    /**
     * @param {int} fjfj dkdj
     * @param {graph} g
Severity: Minor
Found in src/undirected/offline/algo/eulerian/eventour.js - About 3 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 dense_graph_t has 66 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function dense_graph_t(){

    var graph = function(){

        this.pt = [];
Severity: Major
Found in src/undirected/online/data/dense.js - About 2 hrs to fix

    Function sparse_graph_t has 65 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function sparse_graph_t(){
    
        /**
         * Object constructor
         *
    Severity: Major
    Found in src/undirected/online/data/sparse.js - About 2 hrs to fix

      Function floyd_t has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

      export function floyd_t(){
      
          var floyd = function(order, dist){
              var i, j, k;
      
      
      Severity: Minor
      Found in src/undirected/offline/algo/sp/floyd.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 index_t has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function index_t(){
      
          var index = function(G, attr){
      
              this.G = G;
      Severity: Minor
      Found in src/undirected/online/data/gindex.js - About 1 hr to fix

        Function eventour_t has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function eventour_t () {
        
            /**
             * @param {int} fjfj dkdj
             * @param {graph} g
        Severity: Minor
        Found in src/undirected/offline/algo/eulerian/eventour.js - About 1 hr to fix

          Function fuse_t has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function fuse_t(){
          
              var fuse = function(){
          
                  this.obj = Array.prototype.slice.call(arguments);
          Severity: Minor
          Found in src/undirected/online/data/fuse.js - About 1 hr to fix

            Function eventour has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var eventour = function ( g, V, i, done, it, tour, edges ) {
            
                    var u, j, z, r, end;
            
                    z = [i, 0];
            Severity: Minor
            Found in src/undirected/offline/algo/eulerian/eventour.js - About 1 hr to fix

              Function dijkstra has 8 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              export function dijkstra ( g, order, source, prev, dist, used, ref, left ) {
              Severity: Major
              Found in src/undirected/offline/algo/sp/dijkstra.js - About 1 hr to fix

                Function simplegraph_t has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                export function simplegraph_t(){
                
                    var simplegraph = function(g, order, dist, h){
                        var V = [], i, j; // link between g and h
                
                
                Severity: Minor
                Found in src/undirected/offline/algo/eulerian/simplegraph.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 eventour has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    var eventour = function ( g, V, i, done, it, tour, edges ) {
                Severity: Major
                Found in src/undirected/offline/algo/eulerian/eventour.js - About 50 mins to fix

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

                  export function fuse_t(){
                  
                      var fuse = function(){
                  
                          this.obj = Array.prototype.slice.call(arguments);
                  Severity: Minor
                  Found in src/undirected/online/data/fuse.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 dup has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      var dup = function(g, V, m, next, dist, e){
                  Severity: Minor
                  Found in src/undirected/offline/algo/eulerian/dup.js - About 45 mins to fix

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

                        var dfs = function(g, next, dist, s, t){
                    Severity: Minor
                    Found in src/undirected/offline/algo/sp/sptreedfs.js - About 35 mins to fix

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

                      export function sptreedfs_t(){
                      
                          var dfs = function(g, next, dist, s, t){
                      
                              g.eitr([s], function(_, u, w){
                      Severity: Minor
                      Found in src/undirected/offline/algo/sp/sptreedfs.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 sqmat has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      export function sqmat(d, n, v){
                      
                          var i = n;
                          var m = new Array(i);
                      
                      
                      Severity: Minor
                      Found in src/undirected/offline/algo/util/sqmat.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