sebastian-software/core

View on GitHub

Showing 229 of 406 total issues

Avoid too many return statements within this function.
Open

        return "$";
Severity: Major
Found in source/class/core/JSON.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                  return null;
    Severity: Major
    Found in source/class/core/JSON.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                              return context[currentGetter](name);
      Severity: Major
      Found in source/class/core/property/Multi.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                            return data[propertyId+currentPriority];
        Severity: Major
        Found in source/class/core/property/Multi.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return false;
          Severity: Major
          Found in source/class/core/dom/Node.js - About 30 mins to fix

            Function times has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                times : function(func, context, number)
                {
                    if (jasy.Env.isSet("debug"))
                    {
                        core.Assert.isType(func, "Function");
            Severity: Minor
            Found in source/class/core/Number.js - About 25 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 parseHash has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                    parseHash: function(hash) {
            
                        var regex = new RegExp("((source|static|member|property|event)\:)?([A-Za-z0-9_\.]+)?(\~([A-Za-z0-9_]+))");
                        var tmp = unescape(hash).split(regex);
            
            
            Severity: Minor
            Found in source/class/core/apibrowser/Browser.js - About 25 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 __failed has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                __failed : function(message, ex)
                {
                  var combined = message || "";
                  if (ex && combined != ex.message)
                  {
            Severity: Minor
            Found in source/class/core/testrunner/Test.js - About 25 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 contains has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                contains: function(parent, child)
                {
                    if (parent.nodeType == 9) {
                        return child.ownerDocument === parent;
                    } else if (parent.contains) {
            Severity: Minor
            Found in source/class/core/dom/Node.js - About 25 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

            Severity
            Category
            Status
            Source
            Language