Prodigious-Aim-Solutions/Kronicle6

View on GitHub

Showing 186 of 186 total issues

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

},{"../Module.js":4,"babel/polyfill":100}],7:[function(require,module,exports){
"use strict";

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: Minor
Found in examples/browser/main.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 5 has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{}],5:[function(require,module,exports){
"use strict";

var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };

Severity: Major
Found in examples/browser/main.js - About 2 hrs to fix

    Function 29 has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

    },{}],29:[function(require,module,exports){
    // Fast apply
    // http://jsperf.lnkit.com/fast-apply/5
    module.exports = function(fn, args, that){
      var un = that === undefined;
    Severity: Minor
    Found in examples/browser/main.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 exports has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function(grunt) {
    
      grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        'babel': {
    Severity: Major
    Found in Gruntfile.js - About 2 hrs to fix

      Function 9 has 66 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{"../Module.js":4,"./DataSourcesEvents.js":10,"pubsub-js":101}],9:[function(require,module,exports){
      "use strict";
      
      var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
      
      
      Severity: Major
      Found in examples/browser/main.js - About 2 hrs to fix

        Function Kronicle has 65 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var Kronicle = exports.Kronicle = (function () {
            function Kronicle() {
                _classCallCheck(this, Kronicle);
        
                this.core = null;
        Severity: Major
        Found in build/Kronicle.js - About 2 hrs to fix

          Function Kronicle has 65 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var Kronicle = exports.Kronicle = (function () {
              function Kronicle() {
                  _classCallCheck(this, Kronicle);
          
                  this.core = null;
          Severity: Major
          Found in examples/browser/main.js - About 2 hrs to fix

            Function ArrayDataSource has 65 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var ArrayDataSource = exports.ArrayDataSource = (function () {
                function ArrayDataSource() {
                    _classCallCheck(this, ArrayDataSource);
            
                    this.data = [];
            Severity: Major
            Found in examples/browser/main.js - About 2 hrs to fix

              Function ArrayDataSource has 65 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var ArrayDataSource = exports.ArrayDataSource = (function () {
                  function ArrayDataSource() {
                      _classCallCheck(this, ArrayDataSource);
              
                      this.data = [];
              Severity: Major
              Found in build/lib/ArrayDataSource.js - About 2 hrs to fix

                Function 41 has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                Open

                },{"./$":34,"./$.wks":48}],41:[function(require,module,exports){
                // true  -> String#at
                // false -> String#codePointAt
                var $ = require('./$');
                module.exports = function(TO_STRING){
                Severity: Minor
                Found in examples/browser/main.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 9 has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                Open

                },{"../Module.js":4,"./DataSourcesEvents.js":10,"pubsub-js":101}],9:[function(require,module,exports){
                "use strict";
                
                var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
                
                
                Severity: Minor
                Found in examples/browser/main.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 6 has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                },{}],6:[function(require,module,exports){
                "use strict";
                
                var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };
                
                
                Severity: Major
                Found in examples/browser/main.js - About 2 hrs to fix

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

                      remove(item, cb) {
                          this.source.remove(item, (err, data)=> {
                              this._doCbIfExists(cb, err, data);
                              PubSub.publish(events.OnRemove, item, events.OnRemove);
                          });        
                  Severity: Major
                  Found in src/lib/DataSource.js and 2 other locations - About 2 hrs to fix
                  src/lib/DataSource.js on lines 49..54
                  src/lib/DataSource.js on lines 64..69

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

                  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

                      update(item, cb) {
                          this.source.update(item, (err, data) => {
                              this._doCbIfExists(cb, err, data);
                              PubSub.publish(events.OnUpdate, item, events.OnUpdate);
                          });        
                  Severity: Major
                  Found in src/lib/DataSource.js and 2 other locations - About 2 hrs to fix
                  src/lib/DataSource.js on lines 49..54
                  src/lib/DataSource.js on lines 79..84

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

                  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

                      create(item, cb) {
                          this.source.create(item, (err, data) => {
                              this._doCbIfExists(cb, err, data);
                              PubSub.publish(events.OnCreate, item, events.OnCreate);
                          });        
                  Severity: Major
                  Found in src/lib/DataSource.js and 2 other locations - About 2 hrs to fix
                  src/lib/DataSource.js on lines 64..69
                  src/lib/DataSource.js on lines 79..84

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

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

                  },{"./$":34,"./$.array-methods":15,"./$.assert":16,"./$.for-of":27,"./$.uid":46}],22:[function(require,module,exports){
                  'use strict';
                  var $     = require('./$')
                    , $def  = require('./$.def')
                    , BUGGY = require('./$.iter').BUGGY
                  Severity: Major
                  Found in examples/browser/main.js - About 2 hrs to fix

                    Function Component has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var Component = exports.Component = (function (Module) {
                        function Component() {
                            var args = arguments[0] === undefined ? { components: [], template: function () {
                                    return "";
                                }, name: "" } : arguments[0];
                    Severity: Major
                    Found in build/lib/Component.js - About 2 hrs to fix

                      Function Component has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var Component = exports.Component = (function (Module) {
                          function Component() {
                              var args = arguments[0] === undefined ? { components: [], template: function () {
                                      return "";
                                  }, name: "" } : arguments[0];
                      Severity: Major
                      Found in examples/browser/main.js - About 2 hrs to fix

                        Function DataSources has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        var DataSources = exports.DataSources = (function (Module) {
                            function DataSources() {
                                var sources = arguments[0] === undefined ? [] : arguments[0];
                                _classCallCheck(this, DataSources);
                        
                        
                        Severity: Major
                        Found in examples/browser/main.js - About 2 hrs to fix

                          Function DataSources has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          var DataSources = exports.DataSources = (function (Module) {
                              function DataSources() {
                                  var sources = arguments[0] === undefined ? [] : arguments[0];
                                  _classCallCheck(this, DataSources);
                          
                          
                          Severity: Major
                          Found in build/lib/DataSources.js - About 2 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language