sebastian-software/core

View on GitHub

Showing 229 of 406 total issues

Function render has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            render: function(data, partials, labels)
            {
                if (jasy.Env.isSet("debug"))
                {
                    if (!(core.Main.isTypeOf(data, "Object") || core.Main.isTypeOf(data, "Array"))) {
Severity: Minor
Found in source/class/core/template/Template.js - About 1 hr to fix

    Function toISOString has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          toISOString : function()
          {
            var self = this;
            var result, length, value, year, month;
            if (!isFinite(self)) {
    Severity: Minor
    Found in source/class/fix/DateIso.js - About 1 hr to fix

      Function __startDeceleration has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          __startDeceleration: function(timeStamp) {
      
            var self = this;
      
            if (self.options.paging) {
      Severity: Minor
      Found in source/class/core/ui/Scroller.js - About 1 hr to fix

        Function createDelayed has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          var createDelayed = function(nativeMethod)
          {
            return function(callback, context, delay)
            {
              if (jasy.Env.isSet("debug"))
        Severity: Minor
        Found in source/class/core/Function.js - About 1 hr to fix

          Function debounce has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              debounce : function(func, threshold, execAsap)
              {
                if (jasy.Env.isSet("debug"))
                {
                  core.Assert.isType(func, "Function");
          Severity: Minor
          Found in source/class/core/Function.js - About 1 hr to fix

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

                run : function()
                {
                  // Asynchronous test with timeout
                  var timeout = this.__timeout;
                  if (timeout != null)
            Severity: Minor
            Found in source/class/core/testrunner/Test.js - About 1 hr to fix

              Function query has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                  query : function(expression)
                  {
                    var splits = expression.split("/");
                    var current = this;
              
              
              Severity: Minor
              Found in source/class/core/presenter/Abstract.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 Queue has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  scheduling_queue = (function Queue() {
                      var first, last, item;
              
                      function Item(fn,self) {
                          this.fn = fn;
              Severity: Minor
              Found in source/class/core/event/Promise.js - About 1 hr to fix

                Function fadeIn has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    fadeIn : function(elem, from, to, callback, context)
                    {
                      // Already running
                      if (elem.fading == "in") {
                        return;
                Severity: Minor
                Found in source/class/core/bom/Transition.js - About 1 hr to fix

                  Function addField has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          addField : function(field)
                          {
                              // possible variants
                              // 1: name, 1, test, [val1, val2]
                              // 2: name, 2, value
                  Severity: Minor
                  Found in source/class/jasy/Env.js - About 1 hr to fix

                    Function promise has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          var promise = new core.event.Promise(function(resolve, reject) {
                            var result = [];
                    
                            var prom;
                    
                    
                    Severity: Minor
                    Found in source/class/core/event/Flow.js - About 1 hr to fix

                      Function notifyIsolated has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function notifyIsolated(self,cb,chain) {
                              var ret, _then;
                              try {
                                  if (cb === false) {
                                      chain.reject(self.msg);
                      Severity: Minor
                      Found in source/class/core/event/Promise.js - About 1 hr to fix

                        Function __onHistoryChange has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            __onHistoryChange : function(e)
                            {
                              var path = core.util.HashPath.obtain(e.getData());
                              if (path.length == 0)
                              {
                        Severity: Minor
                        Found in source/class/core/application/SinglePage.js - About 1 hr to fix

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

                              run : function(allDoneCallback, testStartedCallback, testFinishedCallback, randomize)
                              {
                                var queue = this.__tests;
                                var length = queue.length;
                          
                          
                          Severity: Minor
                          Found in source/class/core/testrunner/Suite.js - About 1 hr to fix

                            Function __autoCast has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                  __autoCast : function(itemOrProperties)
                                  {
                                    var item;
                            
                                    if (core.Main.isTypeOf(itemOrProperties, "Plain"))
                            Severity: Minor
                            Found in source/class/core/model/Array.js - About 1 hr to fix

                              Consider simplifying this complex logical expression.
                              Open

                                          if (typeof name === 'string')
                                          {
                                              // Find real name, apply if supported
                                              supported = name in helperStyle && name || nameCache[name] || getProperty(name);
                                              if (supported) {
                              Severity: Major
                              Found in source/class/core/bom/Style.js - About 1 hr to fix

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

                                def test(target="source", tool="phantom", browsers=None, main="test.Main", kernel="test.Kernel"):
                                    """
                                    Automatically executes tests in either PhantomJS, NodeJS or via Testem CI
                                    """
                                
                                
                                Severity: Minor
                                Found in jasylibrary.py - 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 serialize has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                      var serialize = function (property, object, callback, properties, whitespace, indentation, stack)
                                Severity: Major
                                Found in source/class/core/JSON.js - About 50 mins to fix

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

                                      var ii = function(a, b, c, d, x, s, t) {
                                  Severity: Major
                                  Found in source/class/core/crypt/MD5.js - About 50 mins to fix

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

                                        var gg = function(a, b, c, d, x, s, t) {
                                    Severity: Major
                                    Found in source/class/core/crypt/MD5.js - About 50 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language