sebastian-software/core

View on GitHub

Showing 406 of 406 total issues

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

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

                    __fireRemove : function(item)
                    {
                      var removeEvent = core.model.RemoveEvent.obtain(item);
                      this.dispatchEvent(removeEvent);
                      removeEvent.release();
              Severity: Major
              Found in source/class/core/model/Array.js and 1 other location - About 1 hr to fix
              source/class/core/model/Array.js on lines 243..248

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

              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

                    __fireAdd : function(item)
                    {
                      var addEvent = core.model.AddEvent.obtain(item);
                      this.dispatchEvent(addEvent);
                      addEvent.release();
              Severity: Major
              Found in source/class/core/model/Array.js and 1 other location - About 1 hr to fix
              source/class/core/model/Array.js on lines 236..241

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

              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

                              if (bitsNeeded <= 5) {
                                  current = ((current << bitsNeeded) + (correctBits >> (5-bitsNeeded))) & 255;
                                  result.push(current);
                                  current = (((correctBits << bitsNeeded) & 255) >> bitsNeeded) & 63;
                                  bitOffset = 5 - bitsNeeded;
              Severity: Major
              Found in source/class/core/util/Base62.js and 1 other location - About 1 hr to fix
              source/class/core/util/Base62.js on lines 95..115

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

              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

                                          content.innerHTML = this.__tmpl.error.render({
                                              name: '404 - Not Found',
                                              description: 'The selected file "' + data.file + '" was not found.'
                                          }, this.__tmpl);
              Severity: Major
              Found in source/class/core/apibrowser/Browser.js and 1 other location - About 1 hr to fix
              source/class/core/apibrowser/Browser.js on lines 435..438

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

              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

                                  content.innerHTML = this.__tmpl.error.render({
                                      name: '404 - Not Found',
                                      description: 'The selected File "' + data.file + '" was not found.'
                                  }, this.__tmpl);
              Severity: Major
              Found in source/class/core/apibrowser/Browser.js and 1 other location - About 1 hr to fix
              source/class/core/apibrowser/Browser.js on lines 420..423

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

              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

                              if (bitsNeeded <= 6) {
                                  var last = charOffset == charLength -1;
                                  var charShift = char;
                                  if (!last) {
                                      charShift = char >> (6-bitsNeeded);
              Severity: Major
              Found in source/class/core/util/Base62.js and 1 other location - About 1 hr to fix
              source/class/core/util/Base62.js on lines 80..93

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

              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 (propertyFire)
                                  {
                                      var eventObject = core.property.Event.obtain(propertyFire, value, old, propertyName);
                                      context.dispatchEvent(eventObject);
                                      eventObject.release();
              Severity: Minor
              Found in source/class/core/property/Simple.js and 1 other location - About 55 mins to fix
              source/class/core/property/Simple.js on lines 249..254

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

              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 (propertyFire)
                                  {
                                      var eventObject = core.property.Event.obtain(propertyFire, value, old, propertyName);
                                      context.dispatchEvent(eventObject);
                                      eventObject.release();
              Severity: Minor
              Found in source/class/core/property/Simple.js and 1 other location - About 55 mins to fix
              source/class/core/property/Simple.js on lines 304..309

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

              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

                  removeViewByName : function(name)
                  {
                    var db = this.__views;
                    var view = db[name];
                    if (view)
              Severity: Minor
              Found in source/class/core/presenter/Abstract.js and 1 other location - About 55 mins to fix
              source/class/core/presenter/Abstract.js on lines 117..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 54.

              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

                      getProperties : function(cls)
                      {
                          if (jasy.Env.isSet("debug")) {
                              core.Class.assertIsClass(cls);
                          }
              Severity: Minor
              Found in source/class/core/Class.js and 1 other location - About 55 mins to fix
              source/class/core/Class.js on lines 521..528

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

              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

                  removeModelByName : function(name)
                  {
                    var db = this.__models;
                    var model = db[name];
                    if (model)
              Severity: Minor
              Found in source/class/core/presenter/Abstract.js and 1 other location - About 55 mins to fix
              source/class/core/presenter/Abstract.js on lines 324..333

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

              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

                      getEvents : function(cls)
                      {
                          if (jasy.Env.isSet("debug")) {
                              core.Class.assertIsClass(cls);
                          }
              Severity: Minor
              Found in source/class/core/Class.js and 1 other location - About 55 mins to fix
              source/class/core/Class.js on lines 534..541

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

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

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

                      isEqual: function(a, b, message)
                      {
                          if (a != b) {
                              raise(message || "Values must be equal: " + a + " and " + b + "!");
                          }
              Severity: Major
              Found in source/class/core/Assert.js and 3 other locations - About 55 mins to fix
              source/class/core/Assert.js on lines 42..47
              source/class/core/Assert.js on lines 54..59
              source/class/core/Assert.js on lines 66..71

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

              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