etnbrd/flx-compiler

View on GitHub

Showing 623 of 1,229 total issues

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

    addNode: function(node, data, i, prefix, settings) {

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

      sigma.canvas.edges.def = function(edge, source, target, context, settings) {

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

      _types.Before = function(callExpr, dep, tree, include, forest) {
      Severity: Minor
      Found in prototypes/blender/lib/resolution.js - About 35 mins to fix

        Function leave has a Cognitive Complexity of 7 (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/iterator.js - 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 d3_layout_hierarchyVisitBefore has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function d3_layout_hierarchyVisitBefore(node, callback) {
          var nodes = [ node ];
          while ((node = nodes.pop()) != null) {
            callback(node);
            if ((children = node.children) && (n = children.length)) {
        Severity: Minor
        Found in lib/graph-printer/pack-layout.js - 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 parseArgs has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function parseArgs(args) {
        
        
          function options() {
          
        Severity: Minor
        Found in lib/lib/interface.js - 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 url has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

          , url: function(name) {
              return function(vals, cb) {
                try {
                  var mapped = vals.map(function(val) {
                    var purl = urlparse(val)
        Severity: Minor
        Found in test-set/express-endpoint-master/lib/rules.js - 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 d3_layout_hierarchyVisitAfter has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function d3_layout_hierarchyVisitAfter(node, callback) {
          var nodes = [ node ], nodes2 = [];
          while ((node = nodes.pop()) != null) {
            nodes2.push(node);
            if ((children = node.children) && (n = children.length)) {
        Severity: Minor
        Found in lib/graph-printer/pack-layout.js - 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 decypherPath has a Cognitive Complexity of 7 (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/parser/index.js - 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 extractUpOnly has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function extractUpOnly(tree, id) {
        
          var _n = {};
          var __n = {};
          var _d = {};
        Severity: Minor
        Found in prototypes/blender.old/lib/extraction.js - 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 extractDown has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function extractDown(tree, id) {
        
          var _n = {};
          var __n = {};
          var _d = {};
        Severity: Minor
        Found in prototypes/blender.old/lib/extraction.js - 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 VariableDeclarator has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        _types.VariableDeclarator = function(n, t) {
        
          // TODO we might not find Assignment dependency, but there is still other dependency, like VariableDeclarator
          // but if variable is global, need to put it in a different chain of compilation.
          // We could return {global: [], local: []} and a peeler function to plug everything correctly by merging stuffs.
        Severity: Minor
        Found in prototypes/blender/lib/builders.js - 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 extractDown has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function extractDown(tree, id) {
        
          var _n = {};
          var __n = {};
          var _d = {};
        Severity: Minor
        Found in prototypes/blender/lib/extract.js - 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 extractUpOnly has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function extractUpOnly(tree, id) {
        
          var _n = {};
          var __n = {};
          var _d = {};
        Severity: Minor
        Found in prototypes/blender/lib/extract.js - 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 bench has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function bench(ITERATION) {
          // LOOP
          start = time.now();
          for(var i=0; i < ITERATION; i++){
            loop();
        Severity: Minor
        Found in prototypes/fluxions/bench/distribution/setTimeout.js - 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

        Avoid too many return statements within this function.
        Open

                if (r > t1) return;
        Severity: Major
        Found in lib/graph-printer/old/bower_components/d3/d3.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              return (rfocx + lfocx) / 2;
          Severity: Major
          Found in lib/graph-printer/old/bower_components/d3/d3.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                  if (!dy && r > 0) return;
            Severity: Major
            Found in lib/graph-printer/old/bower_components/d3/d3.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                return false;
              Severity: Major
              Found in lib/analyzer/context.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        if (r < t0) return;
                Severity: Major
                Found in lib/graph-printer/old/bower_components/d3/d3.js - About 30 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language