Prodigious-Aim-Solutions/Kronicle6

View on GitHub

Showing 186 of 186 total issues

Avoid deeply nested control flow statements.
Open

                        if (message.hasOwnProperty(t) && message[t] === value){
                            delete message[t];
                            result = true;
                        }
Severity: Major
Found in examples/browser/main.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                if (this.prev < entry.catchLoc) {
                  return handle(entry.catchLoc, true);
                }
    Severity: Major
    Found in examples/browser/main.js - About 45 mins to fix

      Function 43 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      },{"./$":34,"./$.string-repeat":43}],43:[function(require,module,exports){
      'use strict';
      var $ = require('./$');
      
      module.exports = function repeat(count){
      Severity: Minor
      Found in examples/browser/main.js - About 45 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

      Avoid deeply nested control flow statements.
      Open

              } else if(IS_EVERY)return false;          // every
      Severity: Major
      Found in examples/browser/main.js - About 45 mins to fix

        Function 13 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

        },{"../../build/Kronicle.js":3,"../../build/lib/ArrayDataSource.js":5,"../../build/lib/Component.js":6,"../../build/lib/Controller.js":7,"../../build/lib/DataSource.js":8,"../../build/lib/DataSources.js":9,"../../build/lib/View.js":11}],13:[function(require,module,exports){
        (function (global){
        "use strict";
        
        require("core-js/shim");
        Severity: Minor
        Found in examples/browser/main.js - About 45 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

        Avoid deeply nested control flow statements.
        Open

                else if(res)switch(TYPE){
                  case 3: return true;                    // some
                  case 5: return val;                     // find
                  case 6: return index;                   // findIndex
                  case 2: result.push(val);               // filter
        Severity: Major
        Found in examples/browser/main.js - About 45 mins to fix

          Consider simplifying this complex logical expression.
          Open

            if(!$.isFunction(C) || !(IS_WEAK || !BUGGY && proto.forEach && proto.entries)){
              // create collection constructor
              C = common.getConstructor(NAME, IS_MAP, ADDER);
              $.mix(C.prototype, methods);
            } else {
          Severity: Major
          Found in examples/browser/main.js - About 40 mins to fix

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

                    for(let mod of modules){
                        
                        this.addedModules[mod.name] = mod;
                        PubSub.publish(events.ModuleLoaded, mod);
                        
            Severity: Minor
            Found in src/Core.js and 1 other location - About 40 mins to fix
            src/lib/DataSources.js on lines 25..29

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

            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(let source of sources) {
                        this.sources[source.name] = source;
                        
                        PubSub.publish(events.DataSourceLoaded, source);
                    }
            Severity: Minor
            Found in src/lib/DataSources.js and 1 other location - About 40 mins to fix
            src/Core.js on lines 19..24

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

            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 exports has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            module.exports = function(NAME, methods, common, IS_MAP, IS_WEAK){
            Severity: Minor
            Found in examples/browser/main.js - About 35 mins to fix

              Function 27 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              },{"./$":34}],27:[function(require,module,exports){
              var ctx  = require('./$.ctx')
                , get  = require('./$.iter').get
                , call = require('./$.iter-call');
              module.exports = function(iterable, entries, fn, that){
              Severity: Minor
              Found in examples/browser/main.js - About 35 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

              Function View has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              var View = exports.View = (function (Module) {
                  function View(args) {
                      _classCallCheck(this, View);
              
                      this.template = args.template || function () {
              Severity: Minor
              Found in build/lib/View.js - About 35 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

              Avoid too many return statements within this function.
              Open

              var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc && desc.writable) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
              Severity: Major
              Found in examples/browser/main.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc && desc.writable) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
                Severity: Major
                Found in examples/browser/main.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                return handle(entry.finallyLoc);
                  Severity: Major
                  Found in examples/browser/main.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                    var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc && desc.writable) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
                    Severity: Major
                    Found in build/lib/DataSource.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                      var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc && desc.writable) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
                      Severity: Major
                      Found in build/lib/Component.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                        var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc && desc.writable) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
                        Severity: Major
                        Found in build/lib/View.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                          var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc && desc.writable) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
                          Severity: Major
                          Found in examples/browser/main.js - About 30 mins to fix

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

                            assert.obj = function(it){
                              if(!$.isObject(it))throw TypeError(it + ' is not an object!');
                              return it;
                            };
                            Severity: Minor
                            Found in examples/browser/main.js and 1 other location - About 30 mins to fix
                            examples/browser/main.js on lines 1075..1078

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

                            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