sebastian-software/core

View on GitHub

Showing 229 of 406 total issues

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

      __bindEvents : function()
      {
        var that = this;

        // reflow handling
Severity: Major
Found in source/class/core/component/Scroller.js - About 2 hrs to fix

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

      {
        /*
        ======================================================
          PARENT CONNECTION
        ======================================================
    Severity: Minor
    Found in source/class/core/presenter/Abstract.js - About 2 hrs to fix

      Function __showContent has 61 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              __showContent: function(data, doToggle) {
      
                  if (data.file) {
      
                      var content = document.getElementById('content'),
      Severity: Major
      Found in source/class/core/apibrowser/Browser.js - About 2 hrs to fix

        Function __runNextSuite has a Cognitive Complexity of 18 (exceeds 5 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 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 scrollX has 60 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          scrollX : function(element, align)
          {
            var parent = element.parentNode;
            var doc = element.ownerDocument;
            var body = doc.body;
        Severity: Major
        Found in source/class/core/bom/ScrollInto.js - About 2 hrs to fix

          Function scrollY has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            scrollY : function(element, align)
            {
              var parent = element.parentNode;
              var doc = element.ownerDocument;
              var body = doc.body;
          Severity: Major
          Found in source/class/core/bom/ScrollInto.js - About 2 hrs to fix

            File Test.js has 266 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*
            ==================================================================================================
              Core - JavaScript Foundation
              Copyright 2012-2014 Sebastian Werner
            ==================================================================================================
            Severity: Minor
            Found in source/class/core/testrunner/Test.js - About 2 hrs to fix

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

                    var get = function (value) {
                      var results, any, key;
                      if (value == "$") {
                        // Unexpected end of input.
                        abort();
              Severity: Major
              Found in source/class/core/JSON.js - About 2 hrs to fix

                Function dispatchEvent has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      dispatchEvent : function(eventObject)
                      {
                        var eventType = eventObject.getType();
                        var eventTarget = this;
                
                
                Severity: Major
                Found in source/class/core/event/MEventTarget.js - About 2 hrs to fix

                  Function start has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          start: function(stepCallback, verifyCallback, completedCallback, duration, easingMethod, root)
                          {
                              var start = time();
                              var lastFrame = start;
                              var percent = 0;
                  Severity: Major
                  Found in source/class/core/effect/Animate.js - About 2 hrs to fix

                    Function build has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        build : function(elems, context, scripts)
                        {
                          if (context == null) {
                            context = document;
                          }
                    Severity: Major
                    Found in source/class/core/bom/Fragment.js - About 2 hrs to fix

                      Function resetter has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  var resetter = function(modifyPriority)
                                  {
                                      return function(value)
                                      {
                                          var context = this;
                      Severity: Major
                      Found in source/class/core/property/Multi.js - About 2 hrs to fix

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

                          construct : function(suites)
                          {
                            var root = document.getElementById("reporter");
                            if (!root)
                            {
                        Severity: Major
                        Found in source/class/core/testrunner/reporter/Html.js - About 2 hrs to fix

                          Function serialize has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                var serialize = function (property, object, callback, properties, whitespace, indentation, stack)
                                {
                                  var value = object[property], className, date, results, element, index, length, prefix, any, result;
                                  if ((typeof value == "object" || typeof value == "function") && value)
                                  {
                          Severity: Major
                          Found in source/class/core/JSON.js - About 2 hrs to fix

                            Function doTouchEnd has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                doTouchEnd: function(timeStamp) {
                            
                                  if (timeStamp instanceof Date) {
                                    timeStamp = timeStamp.valueOf();
                                  }
                            Severity: Major
                            Found in source/class/core/ui/Scroller.js - About 2 hrs to fix

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

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

                                Function scrollX has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  scrollX : 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 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 walk has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function walk(node, labels, nostrip)
                                    {
                                        var code = '';
                                
                                        for (var i=0, l=node.length; i<l; i++)
                                Severity: Major
                                Found in source/class/core/template/Compiler.js - About 2 hrs to fix

                                  Function setter has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                              var setter = function(modifyPriority)
                                              {
                                                  return function(newValue)
                                                  {
                                                      var context = this;
                                  Severity: Minor
                                  Found in source/class/core/property/Multi.js - About 2 hrs to fix

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

                                        fadeOut : function(elem, to, reset, callback, context)
                                        {
                                          // Already running
                                          if (elem.fading == "out") {
                                            return;
                                    Severity: Minor
                                    Found in source/class/core/bom/Transition.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language