sebastian-software/core

View on GitHub

Showing 229 of 406 total issues

Function createView has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    createView : function(name, construct, varargs)
    {
      this.log("Creating view: " + name);

      var db = this.__views;
Severity: Minor
Found in source/class/core/presenter/Abstract.js - About 1 hr to fix

    Function scrollTo has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        scrollTo: function(left, top, animate, zoom) {
    
          var self = this;
    
          // Stop deceleration
    Severity: Minor
    Found in source/class/core/ui/Scroller.js - About 1 hr to fix

      Function tokenize has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              tokenize: function(text, nostrip)
              {
                  if (jasy.Env.isSet("debug"))
                  {
                      core.Assert.isType(text, "String", "Template text must be type of string.");
      Severity: Minor
      Found in source/class/core/template/Parser.js - About 1 hr to fix

        Function sequence has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            sequence : function(tasks, context, arg1)
            {
              if (jasy.Env.isSet("debug"))
              {
                core.Assert.isType(tasks, "Array");
        Severity: Minor
        Found in source/class/core/event/Flow.js - About 1 hr to fix

          Function set has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      members.set = function(value)
                      {
                          var context=this, data, old;
          
                          // Wrap plain types to match property type
          Severity: Minor
          Found in source/class/core/property/Simple.js - About 1 hr to fix

            Function construct has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                construct: function()
                {
                    this.__headElem = document.createElement("div");
                    this.__headElem.id = "head";
                    this.__headElem.innerHTML = "API Documentation";
            Severity: Minor
            Found in source/class/core/apibrowser/Browser.js - About 1 hr to fix

              Function get has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          get : function(property)
                          {
                              if (typeof property == "string")
                              {
                                  var method = getters[property];
              Severity: Minor
              Found in source/class/core/property/MGeneric.js - About 1 hr to fix

                Function getValue has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    getValue : function(item)
                    {
                        if (jasy.Env.isSet("debug"))
                        {
                            core.Assert.isEqual(arguments.length, 1);
                Severity: Minor
                Found in source/class/core/bom/FormItem.js - About 1 hr to fix

                  Function binb has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function binb(x, len)
                      {
                          /* append padding */
                          x[len >> 5] |= 0x80 << (24 - len % 32);
                          x[((len + 64 >> 9) << 4) + 15] = len;
                  Severity: Minor
                  Found in source/class/core/crypt/SHA1.js - About 1 hr to fix

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

                        VALUE : (function(global, toString)
                        {
                            var engine;
                    
                            if (jasy.Env.isSet("runtime", "browser"))
                    Severity: Minor
                    Found in source/class/core/detect/Engine.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 callback has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                    Open

                            callback: function(data, id) {
                    
                                if (core.String.endsWith(id, ".mustache")) {
                    
                                    var templateName = id.substring(0, id.indexOf(".mustache"));
                    Severity: Minor
                    Found in source/class/core/apibrowser/Browser.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 get has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                    Open

                        get : (function()
                        {
                            if (jasy.Env.isSet("runtime", "browser")) {
                                var items = location.search.substring(1).split("&");
                            } else {
                    Severity: Minor
                    Found in source/class/core/detect/Param.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 onreadystatechange has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          xhr.onreadystatechange = function()
                          {
                            if (xhr.readyState == 4)
                            {
                              try{
                    Severity: Minor
                    Found in source/class/core/service/location/GeoCode.js - About 1 hr to fix

                      Function step has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  var step = function(virtual)
                                  {
                                      // Normalize virtual value
                                      var render = virtual !== true;
                      
                      
                      Severity: Minor
                      Found in source/class/core/effect/Animate.js - About 1 hr to fix

                        Function encodeArrayOfBytes has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            var encodeArrayOfBytes = function(arr) {
                                // This works like a bit register. Take first 6 bits and push it to result. Take next 6 bits and so on.
                                // A special case is if the 6 bits represents 60, 61, 62 or 63. In this case one more bit is used to
                                // reduce 6 bit (= 64 different values) by two values.
                                var result = [];
                        Severity: Minor
                        Found in source/class/core/util/Base62.js - About 1 hr to fix

                          Function reset has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      reset : function(property)
                                      {
                                          if (typeof property == "string")
                                          {
                                              var method = resetters[property];
                          Severity: Minor
                          Found in source/class/core/property/MGeneric.js - About 1 hr to fix

                            Function load has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    load : function(uri, callback, context, nocache)
                                    {
                                        if (jasy.Env.isSet("debug"))
                                        {
                                            core.Assert.isType(uri, "String");
                            Severity: Minor
                            Found in source/class/core/io/Image.js - About 1 hr to fix

                              Function navigate has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                    navigate : function(fragment, relation)
                                    {
                                      if (relation == "parent")
                                      {
                                        var destination = this.clone();
                              Severity: Minor
                              Found in source/class/core/util/HashPath.js - About 1 hr to fix

                                Function reset has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                            members.reset = function()
                                            {
                                                var context, data, old, value;
                                                context = this;
                                
                                
                                Severity: Minor
                                Found in source/class/core/property/Simple.js - About 1 hr to fix

                                  Function run has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    run : function()
                                    {
                                      if (this.__isRunning) {
                                        return;
                                      }
                                  Severity: Minor
                                  Found in source/class/core/testrunner/Controller.js - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language