sebastian-software/core

View on GitHub

Showing 229 of 406 total issues

Function testFinished has 33 lines of code (exceeds 25 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 1 hr to fix

    Function buildTree has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function buildTree(tokens, stack)
        {
            var instructions = [];
            var opener = null;
            var token = null;
    Severity: Minor
    Found in source/class/core/template/Parser.js - About 1 hr to fix

      Function add has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          add : function(target, type, callback, context, capture)
          {
            // Hard-wire context to function, re-use existing bound functions
            if (context) {
              callback = core.Function.bind(callback, context);
      Severity: Minor
      Found in source/class/core/bom/TapEvent.js - About 1 hr to fix

        Function __scheduleActivity has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    __scheduleActivity : function(action, key, data) {
                        var tracker = this.__tracker;
                        var queue = this.__queue;
                        var promise = new core.event.Promise(function(resolve, reject) {
                            queue.push({
        Severity: Minor
        Found in source/class/core/store/Abstract.js - About 1 hr to fix

          Function getLabel has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              getLabel : function(item, root)
              {
                  if (!root) {
                      root = document.body;
                  }
          Severity: Minor
          Found in source/class/core/bom/FormItem.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 loadStyleSheet has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              loadStyleSheet : function(assetId)
              {
                return new core.event.Promise(function(resolve, reject) {
                  core.io.StyleSheet.load(jasy.Asset.toUri(assetId), function(uri, errornous, data)
                  {
          Severity: Minor
          Found in source/class/core/view/Dom.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 set has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      set : function(property, value)
                      {
                          if (arguments.length == 2)
                          {
                              if (jasy.Env.isSet("debug")) {
          Severity: Minor
          Found in source/class/core/property/MGeneric.js - About 1 hr to fix

            Function execute has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                execute : function(nodes, context)
                {
                  if (context == null) {
                    context = document;
                  }
            Severity: Minor
            Found in source/class/core/bom/Fragment.js - About 1 hr to fix

              Function loadHtml has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                loadHtml : function(html, parent, secure)
                {
                  if (!parent) {
                    parent = document.body;
                  }
              Severity: Minor
              Found in source/class/core/bom/Iframe.js - About 1 hr to fix

                Function zoomTo has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    zoomTo: function(level, animate, originLeft, originTop) {
                
                      var self = this;
                
                      if (!self.options.zooming) {
                Severity: Minor
                Found in source/class/core/ui/Scroller.js - About 1 hr to fix

                  Function removeAllListeners has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        removeAllListeners : function(type, capture)
                        {
                          if (jasy.Env.isSet("debug"))
                          {
                            if (type != null)
                  Severity: Minor
                  Found in source/class/core/event/MEventTarget.js - About 1 hr to fix

                    Function loadPartial has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        loadPartial : function(assetId, nostrip)
                        {
                          return new core.event.Promise(function(resolve, reject) {
                    
                            // Auto extract partial name from file name
                    Severity: Minor
                    Found in source/class/core/view/Dom.js - About 1 hr to fix

                      Function checkMixinMemberConflicts has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              var checkMixinMemberConflicts = function(include, members, name)
                              {
                                  // Simplifies routine
                                  if (!members) {
                                      members = {};
                      Severity: Minor
                      Found in source/class/core/Class.js - About 1 hr to fix

                        Function query has 30 lines of code (exceeds 25 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

                          Function __treeWalker has 30 lines of code (exceeds 25 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 1 hr to fix

                            Function compareTo has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                  compareTo : function(other)
                                  {
                                    if (this === other) {
                                      return "equal";
                                    }
                            Severity: Minor
                            Found in source/class/core/util/HashPath.js - About 1 hr to fix

                              Function show has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                    show : function(approach)
                                    {
                                      var elem = this.getRoot();
                                      if (!elem) {
                                        return;
                              Severity: Minor
                              Found in source/class/core/view/DomLayer.js - About 1 hr to fix

                                Function loadTemplate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    loadTemplate : function(assetId, nostrip)
                                    {
                                      return new core.event.Promise(function(resolve, reject) {
                                
                                        // Use cached template if available
                                Severity: Minor
                                Found in source/class/core/view/Dom.js - About 1 hr to fix

                                  Function hide has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                        hide : function(approach)
                                        {
                                          var elem = this.getRoot();
                                          if (!elem) {
                                            return;
                                  Severity: Minor
                                  Found in source/class/core/view/DomLayer.js - About 1 hr to fix

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

                                        get : (function()
                                        {
                                            if (jasy.Env.isSet("runtime", "browser")) {
                                                var items = location.search.substring(1).split("&");
                                            } else {
                                    Severity: Minor
                                    Found in source/class/core/detect/Param.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language