sebastian-software/core

View on GitHub

Showing 229 of 406 total issues

Function getFrame has 88 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        getFrame : function(id, frame)
        {
            if (jasy.Env.isSet("debug"))
            {
                core.Assert.isType(id, "String", "Invalid asset ID (no string): " + id + "!");
Severity: Major
Found in source/class/core/io/Asset.js - About 3 hrs to fix

    File Abstract.js has 313 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
    ==================================================================================================
      Core - JavaScript Foundation
      Copyright 2013-2014 Sebastian Werner
    ==================================================================================================
    Severity: Minor
    Found in source/class/core/presenter/Abstract.js - About 3 hrs to fix

      File Array.js has 312 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*
      ==================================================================================================
        Core - JavaScript Foundation
        Copyright 2010-2012 Zynga Inc.
        Copyright 2012-2014 Sebastian Werner
      Severity: Minor
      Found in source/class/core/Array.js - About 3 hrs to fix

        File Browser.js has 308 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
        ==================================================================================================
          API Browser
          Copyright 2012 Zynga Inc.
          Copyright 2012-2014 Sebastian Werner
        Severity: Minor
        Found in source/class/core/apibrowser/Browser.js - About 3 hrs to fix

          `` has 28 functions (exceeds 20 allowed). Consider refactoring.
          Open

            {
              /*
              ----------------------------------------------
                HELPER
              ----------------------------------------------
          Severity: Minor
          Found in source/class/core/testrunner/Test.js - About 3 hrs to fix

            Function binl has 82 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var binl = function(x, len)
                {
                    /* append padding */
                    x[len >> 5] |= 0x80 << ((len) % 32);
                    x[(((len + 64) >>> 9) << 4) + 14] = len;
            Severity: Major
            Found in source/class/core/crypt/MD5.js - About 3 hrs to fix

              Function testFinished has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
              Open

                  testFinished : function(test)
                  {
                    console.info("- " + test.getSummary());
              
                    if (!test.wasSuccessful())
              Severity: Minor
              Found in source/class/core/testrunner/reporter/Console.js - About 3 hrs 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 moveObject has 80 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      moveObject : function(obj, newParent, oldParent)
                      {
                          // Fast compare (e.g. both null - should not happen, but still)
                          if (newParent == oldParent) {
                              return;
              Severity: Major
              Found in source/class/core/property/Multi.js - About 3 hrs to fix

                File Promise.js has 299 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*
                ==================================================================================================
                  Core - JavaScript Foundation
                  Copyright 2013-2014 Sebastian Fastner
                ==================================================================================================
                Severity: Minor
                Found in source/class/core/event/Promise.js - About 3 hrs to fix

                  Function load has 77 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: Major
                  Found in source/class/core/io/StyleSheet.js - About 3 hrs to fix

                    Function load has 74 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: Major
                    Found in source/class/core/io/Script.js - About 2 hrs to fix

                      Function createView has a Cognitive Complexity of 21 (exceeds 5 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 2 hrs 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 createIterator has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        var createIterator = function(config)
                        {
                          var code = '';
                      
                          code += config.init || '';
                      Severity: Major
                      Found in source/class/core/Object.js - About 2 hrs to fix

                        Function preloadSection has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                preloadSection: function(section, recursive, callback, context, random)
                                {
                                    if (jasy.Env.isSet("debug"))
                                    {
                                        core.Assert.isType(section, "String");
                        Severity: Major
                        Found in source/class/core/io/Asset.js - About 2 hrs to fix

                          Function changeInheritedHelper has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              var changeInheritedHelper = function(obj, newValue, oldValue, config)
                              {
                                  // TODO: Improved this lookup via $$children
                                  if (!obj._getChildren) {
                                      return;
                          Severity: Major
                          Found in source/class/core/property/Multi.js - About 2 hrs to fix

                            Function __treeWalker has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                            Open

                                    __treeWalker: function(node, base) {
                            
                                        var html = '';
                            
                                        var filter = function(value) {
                            Severity: Minor
                            Found in source/class/core/apibrowser/Browser.js - About 2 hrs 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 getData has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                getData : function(form)
                                {
                                    if (jasy.Env.isSet("debug"))
                                    {
                                        core.Assert.isEqual(arguments.length, 1);
                            Severity: Major
                            Found in source/class/core/bom/Form.js - About 2 hrs to fix

                              Consider simplifying this complex logical expression.
                              Open

                                if (stringifySupported)
                                {
                                  (function()
                                  {
                                    var value, undef;
                              Severity: Critical
                              Found in source/class/core/detect/JSON.js - About 2 hrs to fix

                                Function Promise has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function Promise(executor, context) {
                                        if (typeof executor != "function") {
                                            throw TypeError("Not a function");
                                        }
                                
                                
                                Severity: Major
                                Found in source/class/core/event/Promise.js - About 2 hrs to fix

                                  Function __stepThroughDeceleration has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      __stepThroughDeceleration: function(render) {
                                  
                                        var self = this;
                                  
                                  
                                  
                                  Severity: Major
                                  Found in source/class/core/ui/Scroller.js - About 2 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language