neyric/wireit

View on GitHub

Showing 497 of 497 total issues

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

              "terminals": [
                      {"direction": [-1,0], "offsetPosition": {"left": -20, "top": 7 }, "name": "in"},
                      {"direction": [1,0], "offsetPosition": {"right": -20, "top": 7 }, "name": "out"}
              ]
Severity: Major
Found in sandbox/editor-examples/BPMN-editor/bpmn-2.0.js and 1 other location - About 1 hr to fix
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 28..31

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

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

              "terminals": [
                      {"direction": [-1,0], "offsetPosition": {"left": -15, "top": 35 }, "name": "in"},
                        {"direction": [1,0], "offsetPosition": {"right": -15, "top": 35 }, "name": "out"}
              ],
Severity: Major
Found in sandbox/editor-examples/BPMN-editor/bpmn-2.0.js and 1 other location - About 1 hr to fix
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 107..110

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

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(d2 < 0.01) {
                            dx = 0.1 * Math.random() + 0.1;
                            dy = 0.1 * Math.random() + 0.1;
                            d2 = dx * dx + dy * dy;
                        }
Severity: Major
Found in sandbox/wireit-layout/wireit-layout.js and 1 other location - About 1 hr to fix
sandbox/wireit-layout/wireit-layout.js on lines 192..196

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

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

                for(var i = 0 ; i < p.length ; i++) {
                    var v = p[i].split('=');
                    oP[v[0]]=window.decodeURIComponent(v[1]);
                }
Severity: Major
Found in sandbox/editor-examples/BPMN-editor/bpmn-2.0.js and 1 other location - About 1 hr to fix
sandbox/editor/editor.js on lines 425..428

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

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

        {
          "name": "comment",
    
          "container": {
             "xtype": "Y.FormContainer",
Severity: Major
Found in sandbox/grouping/examples/WiringEditor/embedded.js and 1 other location - About 1 hr to fix
sandbox/editor-examples/WiringEditor/demo.js on lines 41..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 73.

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

        {
          "name": "comment",
    
          "container": {
             "xtype": "Y.FormContainer",
Severity: Major
Found in sandbox/editor-examples/WiringEditor/demo.js and 1 other location - About 1 hr to fix
sandbox/grouping/examples/WiringEditor/embedded.js on lines 162..178

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

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

    hide: function() {
       if (!Y.Lang.isValue(this.element.style))
            this.element.style = {};
            
       this.element.style.display = "none";        
Severity: Major
Found in sandbox/grouping/js/RubberBand.js and 1 other location - About 1 hr to fix
sandbox/grouping/js/RubberBand.js on lines 139..144

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

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

    show: function() {
        if (!Y.Lang.isValue(this.element.style))
            this.element.style = {};
            
        this.element.style.display = "";        
Severity: Major
Found in sandbox/grouping/js/RubberBand.js and 1 other location - About 1 hr to fix
sandbox/grouping/js/RubberBand.js on lines 129..134

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

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

            for(var i = 0 ; i < p.length ; i++) {
                var v = p[i].split('=');
                oP[v[0]]=window.decodeURIComponent(v[1]);
            }
Severity: Major
Found in sandbox/editor/editor.js and 1 other location - About 1 hr to fix
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 1082..1085

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

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 saveWiring has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

   saveWiring: function (e) {
      var o = {
         name: Y.one('#wiring-name').get('value') || 'Unnamed'
      };
      
Severity: Minor
Found in src/wireit-app/js/editor-view.js - About 1 hr to fix

    Function saveWiring has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

       saveWiring: function (e) {
          var o = {
             name: Y.one('#wiring-name').get('value') || 'Unnamed'
          };
          
    Severity: Minor
    Found in build/wireit-app/wireit-app.js - About 1 hr to fix

      Function saveWiring has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

         saveWiring: function (e) {
            var o = {
               name: Y.one('#wiring-name').get('value') || 'Unnamed'
            };
            
      Severity: Minor
      Found in build/wireit-all/wireit-all.js - About 1 hr to fix

        Function saveWiring has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

           saveWiring: function (e) {
              var o = {
                 name: Y.one('#wiring-name').get('value') || 'Unnamed'
              };
              
        Severity: Minor
        Found in build/wireit-all/wireit-all-debug.js - About 1 hr to fix

          Function saveWiring has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

             saveWiring: function (e) {
                var o = {
                   name: Y.one('#wiring-name').get('value') || 'Unnamed'
                };
                
          Severity: Minor
          Found in build/wireit-app/wireit-app-debug.js - About 1 hr to fix

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

                        {
                        wire.tgt = thisC
                        wire.src = {"moduleId" : self.layer.containers.indexOf(w.terminal1.container), "terminal" : w.terminal1.options.name}            
                        }
            Severity: Major
            Found in sandbox/grouping/js/GroupFormContainer.js and 1 other location - About 1 hr to fix
            sandbox/grouping/js/GroupFormContainer.js on lines 244..247

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

            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

                        {
                        wire.src = thisC
                        wire.tgt = {"moduleId" : self.layer.containers.indexOf(w.terminal2.container), "terminal" : w.terminal2.options.name}
                        }
            Severity: Major
            Found in sandbox/grouping/js/GroupFormContainer.js and 1 other location - About 1 hr to fix
            sandbox/grouping/js/GroupFormContainer.js on lines 249..252

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

            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 xpathReduce has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function xpathReduce(stack, ahead) {
              var cand = null;
            
              if (stack.length > 0) {
                var top = stack[stack.length-1];
            Severity: Minor
            Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 1 hr to fix

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

                  loadPipe: function(name) {
              
                      if(!this.isSaved()) {
                          if( !confirm("Warning: Your work is not saved yet ! Press ok to continue anyway.") ) {
                              return;
              Severity: Minor
              Found in sandbox/editor/editor.js - About 1 hr to fix

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

                    getCollapsedConfig: function(group, map)
                    {
                        if (!Y.Lang.isObject(map))
                        map = Y.GroupUtils.getMap(group);
                        
                Severity: Minor
                Found in sandbox/grouping/js/GroupUtils.js - About 1 hr to fix

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

                        renderLayer: function() {
                           
                           console.log("rendering Layer !!");
                           
                           this.layer = new Y.Layer({
                  Severity: Minor
                  Found in sandbox/yide/tabs/layerTab.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language