Showing 61 of 61 total issues
Function exports
has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (service) {
return {
filter: filter,
filterAll: filterAll,
applyFilters: applyFilters,
- 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 299 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (service) {
return {
filter: filter,
filterAll: filterAll,
applyFilters: applyFilters,
Function exports
has 205 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (service) {
var reductiofy = require('./reductiofy')(service)
var filters = require('./filters')(service)
var postAggregation = require('./postAggregation')(service)
Function doQuery
has 199 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function doQuery(queryObj) {
var queryHash = JSON.stringify(queryObj)
// Attempt to reuse an exact copy of this query that is present elsewhere
for (var i = 0; i < service.columns.length; i++) {
Function exports
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (service) {
var dimension = require('./dimension')(service)
var columnFunc = column
columnFunc.find = findColumn
- 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 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (service) {
var dimension = require('./dimension')(service)
var columnFunc = column
columnFunc.find = findColumn
Function exports
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (service) {
var reductiofy = require('./reductiofy')(service)
var filters = require('./filters')(service)
var postAggregation = require('./postAggregation')(service)
- 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 makeColumn
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
function makeColumn(d) {
var column = _.isObject(d) ? d : {
key: d,
}
Function exports
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (/* service */) {
return {
post: post,
sortByKey: sortByKey,
limit: limit,
File filters.js
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict'
var _ = require('./lodash')
var expressions = require('./expressions')
Function makeFunction
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
function makeFunction(obj, isAggregation) {
var subGetters
// Detect raw $data reference
if (_.isString(obj)) {
Function newQueryObj
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
function newQueryObj(q, parent) {
var locked = false
if (!parent) {
parent = q
q = {}
File lodash.js
has 286 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint no-prototype-builtins: 0 */
'use strict'
module.exports = {
assign: assign,
Function exports
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(service) {
return function clear(def) {
// Clear a single or multiple column definitions
if (def) {
def = _.isArray(def) ? def : [def]
- 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 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (service) {
return {
build: build,
generateColumns: generateColumns,
add: add,
Function applyFilters
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function applyFilters(newFilters) {
var ds = _.map(newFilters, function (fil, i) {
var existing = service.filters[i]
// Filters are the same, so no change is needed on this column
if (fil === existing) {
Function exports
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(service) {
return function clear(def) {
// Clear a single or multiple column definitions
if (def) {
def = _.isArray(def) ? def : [def]
Function clear
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function clear(def) {
// Clear a single or multiple column definitions
if (def) {
def = _.isArray(def) ? def : [def]
}
Function map
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function map(a, b) {
var m
var key
if (isFunction(b)) {
if (isObject(a)) {
- 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 isEqual
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function isEqual(x, y) {
if ((typeof x === 'object' && x !== null) && (typeof y === 'object' && y !== null)) {
if (Object.keys(x).length !== Object.keys(y).length) {
return false
}
- 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"