neyric/wireit

View on GitHub

Showing 497 of 497 total issues

Function addWireConfig has 73 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    addWireConfig: function(group, getInternalContainerId, getExternalTerminalName, externalWires, internalWires, groupIndex)
    {
        var pushUniqueWireConfig = function(wires, newWire) {
          var foundWire= false;
          var wire;
Severity: Major
Found in sandbox/grouping/js/GroupUtils.js - About 2 hrs to fix

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

                {
                       name: "XOR",
                    config: {
                           type: "XorGate", 
                           imageUrl: "images/gate_xor.png",
    Severity: Major
    Found in app-examples/logic-gates/logic-gates.js and 3 other locations - About 2 hrs to fix
    app-examples/logic-gates/logic-gates.js on lines 11..22
    app-examples/logic-gates/logic-gates.js on lines 23..34
    app-examples/logic-gates/logic-gates.js on lines 46..57

    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 93.

    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 4 locations. Consider refactoring.
    Open

                {
                       name: "NAND",
                    config: {
                           type: "NandGate", 
                           imageUrl: "images/gate_nand.png",
    Severity: Major
    Found in app-examples/logic-gates/logic-gates.js and 3 other locations - About 2 hrs to fix
    app-examples/logic-gates/logic-gates.js on lines 11..22
    app-examples/logic-gates/logic-gates.js on lines 23..34
    app-examples/logic-gates/logic-gates.js on lines 58..69

    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 93.

    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 4 locations. Consider refactoring.
    Open

                {
                    name: "OR",
                    config: {
                        type: "OrGate",
                        imageUrl: 'images/gate_or.png',
    Severity: Major
    Found in app-examples/logic-gates/logic-gates.js and 3 other locations - About 2 hrs to fix
    app-examples/logic-gates/logic-gates.js on lines 11..22
    app-examples/logic-gates/logic-gates.js on lines 46..57
    app-examples/logic-gates/logic-gates.js on lines 58..69

    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 93.

    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 4 locations. Consider refactoring.
    Open

                {
                    name: "AND",
                    config: {
                        type: "AndGate",
                        imageUrl: "images/gate_and.png",
    Severity: Major
    Found in app-examples/logic-gates/logic-gates.js and 3 other locations - About 2 hrs to fix
    app-examples/logic-gates/logic-gates.js on lines 23..34
    app-examples/logic-gates/logic-gates.js on lines 46..57
    app-examples/logic-gates/logic-gates.js on lines 58..69

    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 93.

    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

    Function compare has 72 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    BinaryExpr.prototype.compare = function(ctx, cmp) {
      var v1 = this.expr1.evaluate(ctx);
      var v2 = this.expr2.evaluate(ctx);
    
      var ret;
    Severity: Major
    Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 2 hrs to fix

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

          collapse: function()
          {
          if (this.containers.length > 0)
          {
              var layer = this.containers[0].layer
      Severity: Major
      Found in sandbox/grouping/examples/WiringEditor/embedded.js and 1 other location - About 2 hrs to fix
      sandbox/grouping/examples/WiringEditor/embedded.js on lines 41..53

      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 91.

      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

          expand: function()
          {
          if (this.containers.length > 0)
          {
              var layer = this.containers[0].layer
      Severity: Major
      Found in sandbox/grouping/examples/WiringEditor/embedded.js and 1 other location - About 2 hrs to fix
      sandbox/grouping/examples/WiringEditor/embedded.js on lines 26..39

      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 91.

      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

      Function initializer has 68 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              initializer: function(args) {    
                      
                      function onTitleClicked(e, a) {
                       var i = a.findSection(e.target);
                       if (i >= 0) {
      Severity: Major
      Found in sandbox/yide/accordionView.js - About 2 hrs to fix

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

        var ExecutionFrame = function(wiringConfig, frameLevel, parentFrame, parentIndex) {
           
           // save the initial config
           this.wiringConfig = wiringConfig;
           
        Severity: Major
        Found in sandbox/jsBox/ExecutionFrame.js and 1 other location - About 2 hrs to fix
        sandbox/grouping/examples/sawire/ExecutionFrame.js on lines 8..21

        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 88.

        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

               if(t1[1] == t2[1]) {
                     var o = (t1[0] > t2[0]) ? 1 : -1;
                     x1 = t2[0]+o*dlug;
                     x2 = x1;
                     y1 -= d;
        sandbox/wireit-rightsquarearrow-wire/wireit-rightsquarearrow-wire.js on lines 136..142

        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 88.

        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

        var ExecutionFrame = function(wiringConfig, frameLevel, parentFrame, parentIndex) {
           
           // save the initial config
           this.wiringConfig = wiringConfig;
           
        Severity: Major
        Found in sandbox/grouping/examples/sawire/ExecutionFrame.js and 1 other location - About 2 hrs to fix
        sandbox/jsBox/ExecutionFrame.js on lines 8..21

        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 88.

        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

               if(t1[1] == t2[1]) {
                     var o = (t1[0] > t2[0]) ? 1 : -1;
                     x1 = t2[0]+o*dlug;
                     x2 = x1;
                     y1 -= d;
        sandbox/wireit-leftsquarearrow-wire/wireit-leftsquarearrow-wire.js on lines 143..149

        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 88.

        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

        File modules.js has 271 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        var modules= [];
        
        modules[modules.length++] = {
            "name":"xpath",
            "container": {
        Severity: Minor
        Found in sandbox/grouping/examples/sawire/modules.js - About 2 hrs to fix

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

                  if (directions.up)
                  elem.scrollTop = Math.max(0, elem.scrollTop-this.scrollAmount);
                  else if (directions.down)
                  elem.scrollTop = Math.min(elem.scrollHeight, elem.scrollTop+this.scrollAmount);
          Severity: Major
          Found in sandbox/grouping/js/RubberBand.js and 1 other location - About 2 hrs to fix
          sandbox/grouping/js/RubberBand.js on lines 100..103

          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 85.

          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

                  if (directions.left)
                  elem.scrollLeft = Math.max(0, elem.scrollLeft-this.scrollAmount);
                  else if (directions.right)
                  elem.scrollLeft = Math.min(elem.scrollWidth, elem.scrollLeft+this.scrollAmount);
          Severity: Major
          Found in sandbox/grouping/js/RubberBand.js and 1 other location - About 2 hrs to fix
          sandbox/grouping/js/RubberBand.js on lines 105..108

          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 85.

          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

          File Grouper.js has 268 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          (function() {
          
          /**
           * @class Grouper
           */    
          Severity: Minor
          Found in sandbox/grouping/js/Grouper.js - About 2 hrs to fix

            Function collapse has 60 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                collapse: function(expanded)
                {
                    if (Y.Lang.isValue(this.groupContainer))
                    return this.groupContainer; //This group is already collapsed
                    
            Severity: Major
            Found in sandbox/grouping/js/Group.js - About 2 hrs to fix

              Function positionTerminals has 59 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  positionTerminals: function()
                  {
                  var terminals = {};
                  
                  for (var i in this.options.terminals)
              Severity: Major
              Found in sandbox/grouping/js/GroupFormContainer.js - About 2 hrs to fix

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

                        {
                            "name": "Group",
                            "category": "artifact",
                            "container": {
                              "xtype":"Y.ImageContainer", 
                Severity: Major
                Found in sandbox/editor-examples/BPMN-editor/bpmn-2.0.js and 6 other locations - About 2 hrs to fix
                sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 175..187
                sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 253..265
                sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 313..325
                sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 457..469
                sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 614..626
                sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 716..728

                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 82.

                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

                Severity
                Category
                Status
                Source
                Language