etnbrd/flx-compiler

View on GitHub
prototypes/express/src/console/script.js

Summary

Maintainability
F
5 days
Test Coverage

File script.js has 339 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

var socket = io.connect('http://localhost:8080');
var logElm = document.getElementById("log");

Severity: Minor
Found in prototypes/express/src/console/script.js - About 4 hrs to fix

    Function toContext has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    sigma.canvas.edges.toContext = function(e, s, t, ctx, settings) {
      var p = settings('prefix') || '',
          edgeColor = settings('edgeColor'),
          defaultNodeColor = settings('defaultNodeColor'),
          defaultEdgeColor = settings('defaultEdgeColor'),
    Severity: Minor
    Found in prototypes/express/src/console/script.js - About 1 hr to fix

      Function toNode has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      sigma.canvas.edges.toNode = function(e, s, t, ctx, settings) {
        var p = settings('prefix') || '',
            edgeColor = settings('edgeColor'),
            defaultNodeColor = settings('defaultNodeColor'),
            defaultEdgeColor = settings('defaultEdgeColor'),
      Severity: Minor
      Found in prototypes/express/src/console/script.js - About 1 hr to fix

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

        sigma.canvas.edges.toContext = function(e, s, t, ctx, settings) {
          var p = settings('prefix') || '',
              edgeColor = settings('edgeColor'),
              defaultNodeColor = settings('defaultNodeColor'),
              defaultEdgeColor = settings('defaultEdgeColor'),
        Severity: Minor
        Found in prototypes/express/src/console/script.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 frame has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function frame() {
          s.graph.computePhysics();
          s.refresh();
        
          if (s.graph.nodes().length) {
        Severity: Minor
        Found in prototypes/express/src/console/script.js - About 1 hr to fix

          Function _register has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function _register(msg) {
            s.graph.addNode({
              id: msg.name,
              size: nodeRadius,
              x: Math.random(),
          Severity: Minor
          Found in prototypes/express/src/console/script.js - About 1 hr to fix

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

            sigma.canvas.edges.toContext = function(e, s, t, ctx, settings) {
            Severity: Minor
            Found in prototypes/express/src/console/script.js - About 35 mins to fix

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

              sigma.canvas.edges.toNode = function(e, s, t, ctx, settings) {
              Severity: Minor
              Found in prototypes/express/src/console/script.js - About 35 mins to fix

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                  ctx.lineTo(
                    t[p + 'x'] - v.x * (t[p + 'size'] + 5) - v.y * 5,
                    t[p + 'y'] - v.y * (t[p + 'size'] + 5) + v.x * 5
                  )
                Severity: Major
                Found in prototypes/express/src/console/script.js and 1 other location - About 3 hrs to fix
                prototypes/express/src/console/script.js on lines 231..234

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 100.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                  ctx.lineTo(
                    t[p + 'x'] - v.x * (t[p + 'size'] + 5) + v.y * 5,
                    t[p + 'y'] - v.y * (t[p + 'size'] + 5) - v.x * 5
                  )
                Severity: Major
                Found in prototypes/express/src/console/script.js and 1 other location - About 3 hrs to fix
                prototypes/express/src/console/script.js on lines 226..229

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 100.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                  if (e.t > 0) {
                    color = one.color('rgb(255, 0, 73)').value(- 1 + e.t * 0.05, true).css();
                    e.t -= 1;
                  }
                  else
                Severity: Major
                Found in prototypes/express/src/console/script.js and 1 other location - About 2 hrs to fix
                prototypes/express/src/console/script.js on lines 200..205

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 79.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                  if (e.t > 0) {
                    color = one.color('rgb(255, 0, 73)').value(- 1 + e.t * 0.05, true).css();
                    e.t -= 1;
                  }
                  else
                Severity: Major
                Found in prototypes/express/src/console/script.js and 1 other location - About 2 hrs to fix
                prototypes/express/src/console/script.js on lines 255..260

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 79.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                  d = Math.sqrt(Math.pow(t[p + 'x'] - s[p + 'x'], 2) + Math.pow(t[p + 'y'] - s[p + 'y'], 2));
                Severity: Major
                Found in prototypes/express/src/console/script.js and 1 other location - About 2 hrs to fix
                prototypes/express/src/console/script.js on lines 207..207

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 77.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                  d = Math.sqrt(Math.pow(t[p + 'x'] - s[p + 'x'], 2) + Math.pow(t[p + 'y'] - s[p + 'y'], 2));
                Severity: Major
                Found in prototypes/express/src/console/script.js and 1 other location - About 2 hrs to fix
                prototypes/express/src/console/script.js on lines 262..262

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 77.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                  ctx.lineTo(
                    t[p + 'x'] - v.x * t[p + 'size'],
                    t[p + 'y'] - v.y * t[p + 'size']
                  );
                Severity: Major
                Found in prototypes/express/src/console/script.js and 4 other locations - About 1 hr to fix
                prototypes/express/src/console/script.js on lines 217..220
                prototypes/express/src/console/script.js on lines 221..224
                prototypes/express/src/console/script.js on lines 287..290
                prototypes/express/src/console/script.js on lines 291..294

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 68.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                  ctx.moveTo(
                    s[p + 'x'] + v.x * s[p + 'size'],
                    s[p + 'y'] + v.y * s[p + 'size']
                  );
                Severity: Major
                Found in prototypes/express/src/console/script.js and 4 other locations - About 1 hr to fix
                prototypes/express/src/console/script.js on lines 221..224
                prototypes/express/src/console/script.js on lines 236..239
                prototypes/express/src/console/script.js on lines 287..290
                prototypes/express/src/console/script.js on lines 291..294

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 68.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                  ctx.moveTo(
                    s[p + 'x'] + v.x * s[p + 'size'],
                    s[p + 'y'] + v.y * s[p + 'size']
                  );
                Severity: Major
                Found in prototypes/express/src/console/script.js and 4 other locations - About 1 hr to fix
                prototypes/express/src/console/script.js on lines 217..220
                prototypes/express/src/console/script.js on lines 221..224
                prototypes/express/src/console/script.js on lines 236..239
                prototypes/express/src/console/script.js on lines 291..294

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 68.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                  ctx.lineTo(
                    t[p + 'x'] - v.x * t[p + 'size'],
                    t[p + 'y'] - v.y * t[p + 'size']
                  );
                Severity: Major
                Found in prototypes/express/src/console/script.js and 4 other locations - About 1 hr to fix
                prototypes/express/src/console/script.js on lines 217..220
                prototypes/express/src/console/script.js on lines 236..239
                prototypes/express/src/console/script.js on lines 287..290
                prototypes/express/src/console/script.js on lines 291..294

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 68.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                  ctx.lineTo(
                    t[p + 'x'] - v2.x * t[p + 'size'],
                    t[p + 'y'] - v2.y * t[p + 'size']
                  );
                Severity: Major
                Found in prototypes/express/src/console/script.js and 4 other locations - About 1 hr to fix
                prototypes/express/src/console/script.js on lines 217..220
                prototypes/express/src/console/script.js on lines 221..224
                prototypes/express/src/console/script.js on lines 236..239
                prototypes/express/src/console/script.js on lines 287..290

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 68.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                  v = {
                    x: (t[p + 'x'] - s[p + 'x']) / d,
                    y: (t[p + 'y'] - s[p + 'y']) / d
                  };
                Severity: Major
                Found in prototypes/express/src/console/script.js and 1 other location - About 1 hr to fix
                prototypes/express/src/console/script.js on lines 208..211

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 66.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                  v = {
                    x: (t[p + 'x'] - s[p + 'x']) / d,
                    y: (t[p + 'y'] - s[p + 'y']) / d
                  };
                Severity: Major
                Found in prototypes/express/src/console/script.js and 1 other location - About 1 hr to fix
                prototypes/express/src/console/script.js on lines 264..267

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 66.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                dom.addEventListener('mousewheel', function(e) {
                  radius *= sigma.utils.getDelta(e) < 0 ? 1 / wheelRatio : wheelRatio;
                }, false);
                Severity: Minor
                Found in prototypes/express/src/console/script.js and 1 other location - About 50 mins to fix
                prototypes/express/src/console/script.js on lines 531..533

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 51.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                dom.addEventListener('DOMMouseScroll', function(e) {
                  radius *= sigma.utils.getDelta(e) < 0 ? 1 / wheelRatio : wheelRatio;
                }, false);
                Severity: Minor
                Found in prototypes/express/src/console/script.js and 1 other location - About 50 mins to fix
                prototypes/express/src/console/script.js on lines 534..536

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 51.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                  ctx.fillText(node.id,
                    node[prefix + 'x'],
                    node[prefix + 'y'] - node[prefix + 'size'] - 10
                  );
                Severity: Minor
                Found in prototypes/express/src/console/script.js and 1 other location - About 40 mins to fix
                prototypes/express/src/console/script.js on lines 335..338

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 49.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                  ctx.fillText(node.id,
                    node[prefix + 'x'],
                    node[prefix + 'y'] - node[prefix + 'size'] - 10
                  );
                Severity: Minor
                Found in prototypes/express/src/console/script.js and 1 other location - About 40 mins to fix
                prototypes/express/src/console/script.js on lines 309..312

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 49.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                  ctx.arc(
                    node[prefix + 'x'],
                    node[prefix + 'y'],
                    node[prefix + 'size'],
                    0,
                Severity: Minor
                Found in prototypes/express/src/console/script.js and 1 other location - About 40 mins to fix
                prototypes/express/src/console/sigma/src/renderers/canvas/sigma.canvas.nodes.def.js on lines 18..25

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 48.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                There are no issues that match your filters.

                Category
                Status