sebastian-software/core

View on GitHub

Showing 406 of 406 total issues

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

            load: function(uri, callback, context, nocache)
            {
                if (jasy.Env.isSet("debug"))
                {
                    core.Assert.isType(uri, "String");
Severity: Major
Found in source/class/core/io/StyleSheet.js - About 3 hrs to fix

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

            load : function(uri, callback, context, nocache)
            {
                if (jasy.Env.isSet("debug"))
                {
                    core.Assert.isType(uri, "String");
    Severity: Major
    Found in source/class/core/io/Script.js - About 2 hrs to fix

      Function createView has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
      Open

          createView : function(name, construct, varargs)
          {
            this.log("Creating view: " + name);
      
            var db = this.__views;
      Severity: Minor
      Found in source/class/core/presenter/Abstract.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 createIterator has 72 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        var createIterator = function(config)
        {
          var code = '';
      
          code += config.init || '';
      Severity: Major
      Found in source/class/core/Object.js - About 2 hrs to fix

        Function preloadSection has 71 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                preloadSection: function(section, recursive, callback, context, random)
                {
                    if (jasy.Env.isSet("debug"))
                    {
                        core.Assert.isType(section, "String");
        Severity: Major
        Found in source/class/core/io/Asset.js - About 2 hrs to fix

          Function changeInheritedHelper has 69 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              var changeInheritedHelper = function(obj, newValue, oldValue, config)
              {
                  // TODO: Improved this lookup via $$children
                  if (!obj._getChildren) {
                      return;
          Severity: Major
          Found in source/class/core/property/Multi.js - About 2 hrs to fix

            Function __treeWalker has a Cognitive Complexity of 20 (exceeds 5 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 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

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

            def test_node(profile):
                """Automatically executes tests using NodeJS"""
            
                Console.info("")
                Console.info("Running NodeJS based test suite...")
            Severity: Major
            Found in jasylibrary.py and 1 other location - About 2 hrs to fix
            jasylibrary.py on lines 75..83

            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 59.

            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

            def test_phantom(profile):
                """Automatically executes tests using PhantomJS"""
            
                Console.info("")
                Console.info("Running PhantomJS based test suite...")
            Severity: Major
            Found in jasylibrary.py and 1 other location - About 2 hrs to fix
            jasylibrary.py on lines 86..94

            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 59.

            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 getData has 67 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                getData : function(form)
                {
                    if (jasy.Env.isSet("debug"))
                    {
                        core.Assert.isEqual(arguments.length, 1);
            Severity: Major
            Found in source/class/core/bom/Form.js - About 2 hrs to fix

              Consider simplifying this complex logical expression.
              Open

                if (stringifySupported)
                {
                  (function()
                  {
                    var value, undef;
              Severity: Critical
              Found in source/class/core/detect/JSON.js - About 2 hrs to fix

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

                    enable : function(approach)
                    {
                      var names = this.getAllViewNames();
                      for (var i=0, l=names.length; i<l; i++)
                      {
                Severity: Major
                Found in source/class/core/presenter/Section.js and 1 other location - About 2 hrs to fix
                source/class/core/presenter/Section.js on lines 53..61

                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 87.

                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

                    disable : function(approach)
                    {
                      var names = this.getAllViewNames();
                      for (var i=0, l=names.length; i<l; i++)
                      {
                Severity: Major
                Found in source/class/core/presenter/Section.js and 1 other location - About 2 hrs to fix
                source/class/core/presenter/Section.js on lines 43..51

                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 87.

                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 Promise has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function Promise(executor, context) {
                        if (typeof executor != "function") {
                            throw TypeError("Not a function");
                        }
                
                
                Severity: Major
                Found in source/class/core/event/Promise.js - About 2 hrs to fix

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

                      __stepThroughDeceleration: function(render) {
                  
                        var self = this;
                  
                  
                  
                  Severity: Major
                  Found in source/class/core/ui/Scroller.js - About 2 hrs to fix

                    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
                            Severity
                            Category
                            Status
                            Source
                            Language