Showing 30 of 46 total issues
Function factory
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function factory(Promise, Object, MarcRecord, validateFactory, processorFactory) {
'use strict';
return function(parameters) {
Function processBundles
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
function processBundles(filenames, result) {
var data;
var filename = filenames.shift();
if (filename) {
- 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 factory
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function factory(Object, processorFactory) {
'use strict';
return function(parameters)
Function exports
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(config) {
config.set({
singleRun: true,
frameworks: ['mocha', 'requirejs'],
browsers: ['PhantomJS'],
Function factory
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function factory(Promise, Object, validateFactory, MarcRecord, rankFactory, mergeFactory, processorFactory) {
Function factory
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function factory(Promise, Object, jsonSimilarity, rankFactory, MarcRecord, processorFactory) {
Function factory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function factory(Promise, Object, MelindaClient, MarcRecord, recordStoreFactory) {
Function factory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function factory(Promise, Object, MarcRecord, validateFactory, processorFactory) {
Function factory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function factory(Promise, Object, MarcRecord, mergeObjects, hookFactory)
Function factory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function factory(Object, Promise, MarcRecord, marc_record_converters, resultFormatterFactory)