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); } };
- Read upRead up
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); };
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;
- Read upRead up
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': {
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; };
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;
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;
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 = [];
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 = [];
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){
- Read upRead up
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; };
- Read upRead up
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); };
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);
});
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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);
});
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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);
});
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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
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];
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];
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);
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);