sebastian-software/core

View on GitHub

Showing 406 of 406 total issues

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

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

              if (touches.length === 2) {
                currentTouchLeft = Math.abs(touches[0].pageX + touches[1].pageX) / 2;
                currentTouchTop = Math.abs(touches[0].pageY + touches[1].pageY) / 2;
              } else {
        Severity: Major
        Found in source/class/core/ui/Scroller.js and 1 other location - About 2 hrs to fix
        source/class/core/ui/Scroller.js on lines 627..630

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 81.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

              } else {
                currentTouchLeft = Math.abs(touches[0].pageX + touches[1].pageX) / 2;
                currentTouchTop = Math.abs(touches[0].pageY + touches[1].pageY) / 2;
              }
        Severity: Major
        Found in source/class/core/ui/Scroller.js and 1 other location - About 2 hrs to fix
        source/class/core/ui/Scroller.js on lines 697..700

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 81.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        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

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                                if (!property)
                                {
                                    property = core.Object.getKeys(core.Class.getProperties(this.constructor));
                                }
                                else if (jasy.Env.isSet("debug"))
            Severity: Major
            Found in source/class/core/property/MGeneric.js and 1 other location - About 2 hrs to fix
            source/class/core/property/MGeneric.js on lines 125..132

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 80.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                                if (!property)
                                {
                                    property = core.Object.getKeys(core.Class.getProperties(this.constructor));
                                }
                                else if (jasy.Env.isSet("debug"))
            Severity: Major
            Found in source/class/core/property/MGeneric.js and 1 other location - About 2 hrs to fix
            source/class/core/property/MGeneric.js on lines 181..188

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 80.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            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

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                          if (jasy.Env.isSet("debug"))
                          {
                              core.Assert.isEqual(arguments.length, 1);
                              core.dom.Node.assertIsNode(form);
                              core.Assert.isEqual(form.tagName, "FORM");
                  Severity: Major
                  Found in source/class/core/bom/Form.js and 2 other locations - About 2 hrs to fix
                  source/class/core/bom/Form.js on lines 21..26
                  source/class/core/bom/FormItem.js on lines 156..161

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 78.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                          if (jasy.Env.isSet("debug"))
                          {
                              core.Assert.isEqual(arguments.length, 1);
                              core.dom.Node.assertIsNode(form);
                              core.Assert.isEqual(form.tagName, "FORM");
                  Severity: Major
                  Found in source/class/core/bom/Form.js and 2 other locations - About 2 hrs to fix
                  source/class/core/bom/Form.js on lines 121..126
                  source/class/core/bom/FormItem.js on lines 156..161

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 78.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                          if (jasy.Env.isSet("debug"))
                          {
                              core.Assert.isEqual(arguments.length, 1);
                              core.dom.Node.assertIsNode(item);
                              core.Assert.isType(item.name, "String");
                  Severity: Major
                  Found in source/class/core/bom/FormItem.js and 2 other locations - About 2 hrs to fix
                  source/class/core/bom/Form.js on lines 21..26
                  source/class/core/bom/Form.js on lines 121..126

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 78.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                              for (var memberName in members)
                              {
                                  if (override || proto[memberName] === undef)
                                  {
                                      var item = members[memberName];
                  Severity: Major
                  Found in source/class/core/Main.js and 1 other location - About 2 hrs to fix
                  source/class/core/Main.js on lines 313..324

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 78.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                              for (var staticName in statics)
                              {
                                  if (override || object[staticName] === undef)
                                  {
                                      var item = statics[staticName];
                  Severity: Major
                  Found in source/class/core/Main.js and 1 other location - About 2 hrs to fix
                  source/class/core/Main.js on lines 337..348

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 78.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  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

                    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

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                        if (perspectiveProperty)
                        {
                          var render = function(left, top, zoom)
                          {
                            var content = this.__container.firstElementChild;
                      Severity: Major
                      Found in source/class/core/component/Scroller.js and 1 other location - About 2 hrs to fix
                      source/class/core/component/Scroller.js on lines 15..32

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 77.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Severity
                      Category
                      Status
                      Source
                      Language