Showing 69 of 132 total issues
File c_class.js
has 443 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var FacetedObject = require('../abstract/faceted_object')
, facetsRegistry = require('./c_facets/cf_registry')
File dom.js
has 392 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var config = require('../config')
, miloCore = require('milo-core')
Function exports
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(grunt) {
grunt.initConfig({
mochaTest: {
test: {
File Data.js
has 358 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var miloCore = require('milo-core')
, Mixin = miloCore.classes.Mixin
, ComponentFacet = require('../c_facet')
File storage_test.js
has 354 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
/* eslint-env browser, commonjs, node, mocha */
var assert = require('assert');
Function onDragStart
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function onDragStart(eventType, event) {
event.stopPropagation();
if (this.config.off || ! targetInDragHandle.call(this)) {
event.preventDefault();
- 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 createBinderScope
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function createBinderScope(scopeEl, scopeObjectFactory, rootScope, bindRootElement, throwOnErrors) {
scopeEl = scopeEl || document.body;
var scope = rootScope || new Scope(scopeEl)
, addMethod = throwOnErrors === false ? '_safeAdd' : '_add';
- 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
File List.js
has 288 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var ComponentFacet = require('../c_facet')
, Component = require('../c_class')
, facetsRegistry = require('./cf_registry')
Function insertAtTreePath
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function insertAtTreePath(rootEl, treePath, el, nearest) {
var toNormalize = el.nodeType == Node.TEXT_NODE;
if (rootEl.contains(el))
removeElement(el); // can't use removeChild as rootEl here is not an immediate parent
- 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 Data$_set
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function Data$_set(value) {
var inTransaction = getTransactionFlag(Data$_set);
var valueSet;
if (value !== null && typeof value == 'object') {
- 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
File request.js
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
// milo.utils.request
// -----------
Function request$jsonp
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
function request$jsonp(url, callback) {
var abort;
return addAbortAbility(
new Promise(function (resolve, reject) {
var script = document.createElement('script'),
Function List$_addItems
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function List$_addItems(count, index) {
check(count, Match.Integer);
if (!this.itemSample)
return logger.error('List$_addItems: Item sample missing.');
- 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 _onReady
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function _onReady(eventType, req, callback, resolve, reject) {
if (req.readyState != 4) return;
if (req[config.request.completedKey]) return;
_.spliceItem(_pendingRequests, req);
- 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 ComponentFacet$onConfigMessages
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function ComponentFacet$onConfigMessages(messageSubscribers) {
var notYetRegisteredMap = _.mapKeys(messageSubscribers, function(subscriber, messages) {
var subscriberType = typeof subscriber;
if (subscriberType == 'function')
return this.on(messages, subscriber);
- 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 List$_addItems
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function List$_addItems(count, index) {
check(count, Match.Integer);
if (!this.itemSample)
return logger.error('List$_addItems: Item sample missing.');
Function Data$_splice
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function Data$_splice(spliceIndex, spliceHowMany) { //, ... arguments
var inTransaction = getTransactionFlag(Data$_splice);
var listFacet = this.owner.list;
if (! listFacet)
- 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 Decoder
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function Decoder() {
var skip = 0; // how many bits we have from the previous character
var byte = 0; // current byte we're producing
this.output = '';
- 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 Data$_splice
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Data$_splice(spliceIndex, spliceHowMany) { //, ... arguments
var inTransaction = getTransactionFlag(Data$_splice);
var listFacet = this.owner.list;
if (! listFacet)
Function onDragStart
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function onDragStart(eventType, event) {
event.stopPropagation();
if (this.config.off || ! targetInDragHandle.call(this)) {
event.preventDefault();