sebastian-software/core

View on GitHub

Showing 229 of 406 total issues

Function checkSetter has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    checkSetter : function(obj, config, args)
    {
        var name = config.name;

        if (args.length == 0) {
Severity: Minor
Found in source/class/core/property/Debug.js - About 1 hr to fix

    Function __publish has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        __publish: function(left, top, zoom, animate) {
    
          var self = this;
    
          // Remember whether we had an animation, then we try to continue based on the current "drive" of the animation
    Severity: Minor
    Found in source/class/core/ui/Scroller.js - About 1 hr to fix

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

              load : function(uri, callback, context, nocache, timeout)
              {
                  if (!context) {
                      context = global;
                  }
      Severity: Minor
      Found in source/class/core/io/Text.js - About 1 hr to fix

        Function map has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          var map = function(promisesOrValues, mapFunction, context)
          {
            if (jasy.Env.isSet("debug"))
            {
              core.Assert.isType(mapFunction, "Function", "Flow control map() requires second parameter to be an mapping function!");
        Severity: Minor
        Found in source/class/core/event/Flow.js - About 1 hr to fix

          Function scrollY has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
          Open

            scrollY : function(element, align)
            {
              var parent = element.parentNode;
              var doc = element.ownerDocument;
              var body = doc.body;
          Severity: Minor
          Found in source/class/core/bom/ScrollInto.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 decodeToArrayOfBytes has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              var decodeToArrayOfBytes = function(arr) {
                  var result = [];
                  var current = 0;
                  var bitOffset = 0;
                  var charOffset = 0;
          Severity: Minor
          Found in source/class/core/util/Base62.js - About 1 hr to fix

            Function isValid has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

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

                detect : function(data)
                {
                  return new core.event.Promise(function(resolve, reject) {
                    var url = "//maps.googleapis.com/maps/api/geocode/json?sensor=true&latlng=";
                    url += data.latitude + "," + data.longitude;
              Severity: Minor
              Found in source/class/core/service/location/GeoCode.js - About 1 hr to fix

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

                    function binb(m, l)
                    {
                        var HASH = [1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225];
                        var W = new Array(64);
                        var a, b, c, d, e, f, g, h;
                Severity: Minor
                Found in source/class/core/crypt/SHA256.js - About 1 hr to fix

                  Function construct has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                  Open

                    construct : function(nativeEvent, eventType)
                    {
                      // We use the touchpoint for touch events
                      var isMouse = nativeEvent.type != null ? true : false;
                  
                  
                  Severity: Minor
                  Found in source/class/core/bom/event/type/Pointer.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 isTypeOf has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          isTypeOf : function(value, type)
                          {
                              var result = false;
                  
                              if (value == null)
                  Severity: Minor
                  Found in source/class/core/Main.js - About 1 hr to fix

                    Function getter has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                var getter = function()
                                {
                                    var context = this;
                    
                                    if (jasy.Env.isSet("debug")) {
                    Severity: Minor
                    Found in source/class/core/property/Multi.js - About 1 hr to fix

                      Function doTouchStart has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          doTouchStart: function(touches, timeStamp) {
                      
                            // Array-like check is enough here
                            if (touches.length == null) {
                              throw new Error("Invalid touch list: " + touches);
                      Severity: Minor
                      Found in source/class/core/ui/Scroller.js - About 1 hr to fix

                        Function any has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            any : function(promisesOrValues)
                            {
                              if (jasy.Env.isSet("debug")) {
                                core.Assert.isType(promisesOrValues, "ArrayOrPromise");
                              }
                        Severity: Minor
                        Found in source/class/core/event/Flow.js - About 1 hr to fix

                          Function __runNextSuite has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            __runNextSuite : function()
                            {
                              var previousSuite = this.__suites[this.__currentIndex];
                              var currentSuite = this.__suites[++this.__currentIndex];
                          
                          
                          Severity: Minor
                          Found in source/class/core/testrunner/Controller.js - About 1 hr to fix

                            Function checksum has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                checksum : (function()
                                {
                                    var table =
                                [
                                  0, 1996959894, 3993919788, 2567524794, 124634137, 1886057615, 3915621685, 2657392035, 249268274,
                            Severity: Minor
                            Found in source/class/core/crypt/CRC32.js - About 1 hr to fix

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

                                  var decompress64 = function(encodedText) {
                                      var marker = codePointAt(encodedText, 0);
                                      if ((marker >> 4) !== MARKERINT) {
                                          return encodedText;
                                      }
                              Severity: Minor
                              Found in source/class/core/util/TextCompressor.js - About 1 hr to fix

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

                                  construct : function(nativeEvent, eventType)
                                  {
                                    // We use the touchpoint for touch events
                                    var isMouse = nativeEvent.type != null ? true : false;
                                
                                
                                Severity: Minor
                                Found in source/class/core/bom/event/type/Pointer.js - About 1 hr to fix

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

                                          __onLoad : function() {
                                  
                                              document.body.addEventListener('click', function(event) {
                                  
                                                  var element = event.target;
                                  Severity: Minor
                                  Found in source/class/core/apibrowser/Browser.js - About 1 hr to fix

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

                                            getImage : function(id)
                                            {
                                                if (jasy.Env.isSet("debug")) {
                                                    core.Assert.isType(id, "String", "Invalid asset ID (no string): " + id + "!");
                                                }
                                    Severity: Minor
                                    Found in source/class/core/io/Asset.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language