Showing 30 of 46 total issues
Function factory
has 245 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function factory(Promise, Object, MelindaClient, MarcRecord, recordStoreFactory) {
'use strict';
function normalizeRecordId(id)
Function factory
has 198 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function factory(Promise, Object, MarcRecord, mergeObjects, hookFactory)
{
'use strict';
Function run
has 176 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
run: function(records)
{
return record_store.read({
idList: [records[0].melindaHostId],
Function normalizeMatches
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function normalizeMatches(records)
{
function hasFailures(records)
{
Function factory
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function factory(Promise, Object, MarcRecord, hookFactory)
{
'use strict';
Function processBundles
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function processBundles(filenames, result) {
var data;
var filename = filenames.shift();
if (filename) {
Function factory
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function factory(Promise, Object, validateFactory, MarcRecord, rankFactory, mergeFactory, processorFactory) {
'use strict';
var DEFAULT_OPTIONS = {
Function factory
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function factory(Object, Promise, MarcRecord, marc_record_converters, resultFormatterFactory)
{
'use strict';
File melinda.js
has 268 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
*
* @licstart The following is the entire license notice for the JavaScript code in this file.
*
* Melinda-related modules for recordLoader
Function exports
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
Open
module.exports = function(name, argv, console, std_streams)
{
'use strict';
- 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 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(name, argv, console, std_streams)
{
'use strict';
Function factory
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function factory(Promise, Object, jsonSimilarity, rankFactory, MarcRecord, processorFactory) {
'use strict';
return function(parameters)
Function read
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
read: function(query)
{
var fn_get_records, fn_get_records_cache;
Function normalizeResults
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function normalizeResults(original_results) {
var normalized_results = {
matched: false,
matchingBundles: [],
bundleResults: clone(original_results),
Function factory
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function factory(Object, marc_record_converters, recordSetFactory)
{
'use strict';
Function findMissingByIndex
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function findMissingByIndex(record, index, records)
{
function getSurroundingRecords()
{
Function run
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
run: function(record, matched_records)
{
var result;
Function update
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
update: function(query, record_data)
{
function process(list, results)
{
Function pump
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function pump(list, results)
{
var id = list.shift();
Function run
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
run: function(records_data)
{
logger.info('Retrieving record store counterpart');