etnbrd/flx-compiler

View on GitHub

Showing 623 of 1,229 total issues

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

Timbit.prototype.generateTests = function(alltests) {
  
  // create combination of required parameters
  var required = [];
  for (var name in this.params) {
Severity: Minor
Found in test-set/timbits-master/lib/timbits.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 leave has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  leave: function(n, p, c) {

    if (n.modifier) {
      if (n.modifier.target === 'signature') {
        return bld.signatureModifier(n.name);
Severity: Minor
Found in lib/js-printer/iterators/main.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 setOptions has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function setOptions(options) {
  if (!options.encryptionSecret) {
    throw new Error('No `encryptionSecret` provided to heroku-bouncer');
  }

Severity: Minor
Found in test-set/node-heroku-bouncer-master/index.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 toGraphviz has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function toGraphviz() {
  var _output = [
    'digraph G {\n',
    '  graph [ fontname="HelveticaNeue-Thin", fontcolor=black, fontsize=20 ];',
    '  node [ fontname="HelveticaNeue-Thin", fontcolor=black, fontsize=20, penwidth=0.5 shape=circle, fixedsize=true, width=1.2, height=1.2 ];',
Severity: Minor
Found in prototypes/recast/main.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 plot has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function plot(options) {
  if (options && options.label) {  
    this._label = options.label;
    options.label = undefined;
  }
Severity: Minor
Found in prototypes/fluxions/bench/diffInstructions/pgfplots.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 plot has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function plot(options) {
  if (options && options.label) {  
    this._label = options.label;
    options.label = undefined;
  }
Severity: Minor
Found in prototypes/fluxions/bench/distribution/pgfplots.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 state_machine_with_loop has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

var state_machine_with_loop = function(){
  while(true){
    switch(state){
      case 1: {
        if(state_cpt >= LENGTH-3){
Severity: Minor
Found in prototypes/fluxions/bench/distribution/setTimeout.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 access has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
Severity: Major
Found in test-set/gifsockets-server-master/public/js/jquery.js - About 50 mins to fix

    Function addEdge has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        addEdge: function(edge, source, target, data, i, prefix, settings) {

      Function addEdge has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          addEdge: function(edge, source, target, data, i, prefix, settings) {

        Function addEdge has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            addEdge: function(edge, source, target, data, i, prefix, settings) {

          Avoid deeply nested control flow statements.
          Open

                    while (++i < n) if (!value.contains(name[i])) return false;
          Severity: Major
          Found in lib/graph-printer/old/bower_components/d3/d3.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                      while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false;
            Severity: Major
            Found in lib/graph-printer/old/bower_components/d3/d3.js - About 45 mins to fix

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

              function decypherPath(path, _dirname) {
              
                var filepath = pth.resolve(_dirname, path);
              
                if (fs.existsSync(filepath)) {
              Severity: Minor
              Found in lib/analyzer/helpers.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

              Avoid deeply nested control flow statements.
              Open

                          if (subnode = subnodes[k]) d3_transitionNode(subnode, k, id, transition);
              Severity: Major
              Found in lib/graph-printer/old/bower_components/d3/d3.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                            if (ids[0] === property.key.name) {
                              if(ids.length === 1)
                                return true;
                              // else
                                // checkProp(ids.slice(1), property)
                Severity: Major
                Found in lib/analyzer/context.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ;
                  Severity: Major
                  Found in lib/graph-printer/old/bower_components/d3/d3.js - About 45 mins to fix

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

                      function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {
                    Severity: Minor
                    Found in lib/graph-printer/old/bower_components/d3/d3.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                  for (var i = points.length - 1; i >= 0; --i) listener.point((point = points[i])[0], point[1]);
                      Severity: Major
                      Found in lib/graph-printer/old/bower_components/d3/d3.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                      if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ;
                        Severity: Major
                        Found in lib/graph-printer/old/bower_components/d3/d3.js - About 45 mins to fix
                          Severity
                          Category
                          Status
                          Source
                          Language