neyric/wireit

View on GitHub

Showing 497 of 497 total issues

Function value has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

         var value = function(a,b,c,d,e,f,g,h) {
Severity: Major
Found in sandbox/grouping/examples/sawire/ExecutionFrame.js - About 1 hr to fix

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

                if (Y.Lang.isValue(usedNames.fields[o.rename]))
                    throw {"type" : "MappingError", "message" : "Two identical field names specified (" + o.rename + ")"}
    Severity: Minor
    Found in sandbox/grouping/js/GroupUtils.js and 1 other location - About 55 mins to fix
    sandbox/grouping/js/GroupUtils.js on lines 544..545

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

    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 (Y.Lang.isValue(usedNames.terminals[o.rename]))
                        throw {"type" : "MappingError", "message" : "Two identical terminal names specified (" + o.rename + ")"}
    Severity: Minor
    Found in sandbox/grouping/js/GroupUtils.js and 1 other location - About 55 mins to fix
    sandbox/grouping/js/GroupUtils.js on lines 852..853

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

    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 _drawArrow has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

       _drawArrow: function(src, tgt) {
    
    
          var d = 7, // arrow width/2
              distance = Math.sqrt(Math.pow(src[0]-tgt[0],2) + Math.pow(src[1]-tgt[1],2)),
    Severity: Minor
    Found in src/arrow-wire/js/arrow-wire.js - About 55 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

    ExecutionFrame.setExecutionStateForContainer =  function(container, state){
        var bodyEl= container.bodyEl;
          if( bodyEl ) {
             if( state != "js-execution-starting") Y.one(bodyEl).removeClass("js-execution-starting");
             if( state != "js-execution-ok") Y.one(bodyEl).removeClass("js-execution-ok");
    Severity: Minor
    Found in sandbox/grouping/examples/sawire/ExecutionFrame.js - About 55 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

    function xpathSort(input, sort) {
      if (sort.length == 0) {
        return;
      }
    
    
    Severity: Minor
    Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 55 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

                tgt: {moduleId: Y.Array.indexOf(this.containers, wire.terminal2.container), terminal: wire.terminal2.options.name}
    Severity: Minor
    Found in sandbox/grouping/examples/WiringEditor/embedded.js and 1 other location - About 55 mins to fix
    sandbox/grouping/examples/WiringEditor/embedded.js on lines 74..74

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

    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

                src: {moduleId: Y.Array.indexOf(this.containers, wire.terminal1.container), terminal: wire.terminal1.options.name}, 
    Severity: Minor
    Found in sandbox/grouping/examples/WiringEditor/embedded.js and 1 other location - About 55 mins to fix
    sandbox/grouping/examples/WiringEditor/embedded.js on lines 75..75

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

    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 addTerminal has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            var addTerminal = function(internalName, tMap, override, moduleId, fieldTerminals, showOn, showOff)
    Severity: Major
    Found in sandbox/grouping/js/Group.js - About 50 mins to fix

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

              var addField = function(internalName, fMap, override, moduleId, fieldTerminals, showOn, showOff)
      Severity: Major
      Found in sandbox/grouping/js/Group.js - About 50 mins to fix

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

            for (var i = 0; i < src.childNodes.length; ++i) {
              arguments.callee(dst, src.childNodes[i], dstDocument);
            }
        Severity: Minor
        Found in sandbox/grouping/examples/sawire/xml/xslt.js and 1 other location - About 50 mins to fix
        sandbox/grouping/examples/sawire/xml/xslt.js on lines 553..555

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

        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

              for (var i = 0; i < src.childNodes.length; ++i) {
                arguments.callee(node, src.childNodes[i], dstDocument);
              }
        Severity: Minor
        Found in sandbox/grouping/examples/sawire/xml/xslt.js and 1 other location - About 50 mins to fix
        sandbox/grouping/examples/sawire/xml/xslt.js on lines 541..543

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

        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 < node.childNodes.length; ++i) {
                arguments.callee(node.childNodes[i], buf, cdata);
              }
        Severity: Minor
        Found in sandbox/grouping/examples/sawire/xml/util.js and 1 other location - About 50 mins to fix
        sandbox/grouping/examples/sawire/xml/util.js on lines 329..331

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

        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 < node.childNodes.length; ++i) {
              arguments.callee(node.childNodes[i], buf, cdata);
            }
        Severity: Minor
        Found in sandbox/grouping/examples/sawire/xml/util.js and 1 other location - About 50 mins to fix
        sandbox/grouping/examples/sawire/xml/util.js on lines 321..323

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

        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

                  this.options.modulesAccordionViewParams = Y.mix({
                                                                collapsible: true, 
                                                                expandable: true, // remove this parameter to open only one panel at a time
                                                                width: 'auto', 
                                                                expandItem: 0, 
        Severity: Minor
        Found in sandbox/editor/editor.js and 1 other location - About 50 mins to fix
        sandbox/editor-base/editor-base.js on lines 48..56

        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

            accordionViewParams: {
                collapsible: true, 
                expandable: true, // remove this parameter to open only one panel at a time
                width: 'auto', 
                expandItem: 0, 
        Severity: Minor
        Found in sandbox/editor-base/editor-base.js and 1 other location - About 50 mins to fix
        sandbox/editor/editor.js on lines 56..64

        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

                for (var cI in overrides.containerOverrides)
                {
                var o =  overrides.containerOverrides[cI];
                
                this.containers[cI].overrides = o;
        Severity: Minor
        Found in sandbox/grouping/js/Group.js and 1 other location - About 50 mins to fix
        sandbox/grouping/js/Group.js on lines 508..513

        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

                for (var gI in overrides.groupOverrides)
                {
                var o =  overrides.groupOverrides[cI];
                
                this.groups[gI].overrides = o;
        Severity: Minor
        Found in sandbox/grouping/js/Group.js and 1 other location - About 50 mins to fix
        sandbox/grouping/js/Group.js on lines 501..506

        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

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

        UnionExpr.prototype.evaluate = function(ctx) {
          var nodes1 = this.expr1.evaluate(ctx).nodeSetValue();
          var nodes2 = this.expr2.evaluate(ctx).nodeSetValue();
          var I1 = nodes1.length;
          for (var i2 = 0; i2 < nodes2.length; ++i2) {
        Severity: Minor
        Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 45 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Avoid deeply nested control flow statements.
        Open

            if (this.nodetest.evaluate(ctx).booleanValue()) {
              nodelist.push(input);
            }
        Severity: Major
        Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 45 mins to fix
          Severity
          Category
          Status
          Source
          Language