NatLibFi/marc-record-validators-melinda

View on GitHub

Showing 1,132 of 1,132 total issues

Function fieldToChain has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export function fieldToChain(field, record) {
  if (field.deleted || !field.subfields) {
    return [];
  }
  const chain = newGetAllLinkedFields(field, record, true, true);
Severity: Minor
Found in src/removeDuplicateDataFields.js - About 55 mins to fix

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 mergeOrAddSubfieldNotRequired has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function mergeOrAddSubfieldNotRequired(targetField, candSubfieldData) {
  if (catalogingSourceModifyingAgencyCandIsOriginalCatalogingSourceAgencyInTargetField(targetField, candSubfieldData) || ennakkotietoInSubfieldG(candSubfieldData)) {
    return true;
  }

Severity: Minor
Found in src/merge-fields/mergeOrAddSubfield.js - About 55 mins to fix

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 subfieldToNormalizedString has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function subfieldToNormalizedString(sf, tag, targetLinkingNumber = 0, normalizeOccurrenceNumber = false, normalizeEntryTagBoolean = false) {
  // targetLinkingNumber refers to $8.
  // normalizeEntryTagBoolean refers to 1XX/7XX tag values in subfield $6 value.
  if (isValidSubfield6(sf)) { // && targetLinkingNumber === 0) {
    // 1XX/7XX (entry tag) normalization:
Severity: Minor
Found in src/subfield6Utils.js - About 55 mins to fix

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

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        const fieldModified = {
          tag: '245',
          ind1: ' ',
          ind2: ' ',
          subfields: [
Severity: Major
Found in src/unicode-decomposition.spec.js and 2 other locations - About 55 mins to fix
src/urn.spec.js on lines 17..25
src/urn.spec.js on lines 60..68

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 53.

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

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  const f337nonElectronic = {
    tag: '337',
    ind1: ' ',
    ind2: ' ',
    subfields: [
Severity: Major
Found in src/urn.spec.js and 2 other locations - About 55 mins to fix
src/unicode-decomposition.spec.js on lines 86..100
src/urn.spec.js on lines 60..68

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 53.

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

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  const ldf856partial = {
    tag: '856',
    ind1: '4',
    ind2: '0',
    subfields: [
Severity: Major
Found in src/urn.spec.js and 2 other locations - About 55 mins to fix
src/unicode-decomposition.spec.js on lines 86..100
src/urn.spec.js on lines 17..25

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 53.

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

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    const subfields2 = field2.subfields.filter(subfield => subfield.code === subfieldCode && valueCarriesMeaning(field2.tag, subfield.code, subfield.value));
Severity: Major
Found in src/merge-fields/counterpartField.js and 3 other locations - About 50 mins to fix
src/merge-fields/counterpartField.js on lines 250..250
src/merge-fields/counterpartField.js on lines 258..258
src/merge-fields/counterpartField.js on lines 259..259

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 52.

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

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    const subfields2 = field2.subfields.filter(subfield => subfield.code === subfieldCode && valueCarriesMeaning(field2.tag, subfield.code, subfield.value));
Severity: Major
Found in src/merge-fields/counterpartField.js and 3 other locations - About 50 mins to fix
src/merge-fields/counterpartField.js on lines 250..250
src/merge-fields/counterpartField.js on lines 251..251
src/merge-fields/counterpartField.js on lines 258..258

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 52.

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

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    const subfields1 = field1.subfields.filter(subfield => subfield.code === subfieldCode && valueCarriesMeaning(field1.tag, subfield.code, subfield.value));
Severity: Major
Found in src/merge-fields/counterpartField.js and 3 other locations - About 50 mins to fix
src/merge-fields/counterpartField.js on lines 250..250
src/merge-fields/counterpartField.js on lines 251..251
src/merge-fields/counterpartField.js on lines 259..259

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 52.

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

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    const subfields1 = field1.subfields.filter(subfield => subfield.code === subfieldCode && valueCarriesMeaning(field1.tag, subfield.code, subfield.value));
Severity: Major
Found in src/merge-fields/counterpartField.js and 3 other locations - About 50 mins to fix
src/merge-fields/counterpartField.js on lines 251..251
src/merge-fields/counterpartField.js on lines 258..258
src/merge-fields/counterpartField.js on lines 259..259

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 52.

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

Further Reading

Similar blocks of code found in 19 locations. Consider refactoring.
Open

    {'tag': '092',
      'repeatable': true,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
      'subfields': [{'code': 'a', 'repeatable': false}]},
Severity: Major
Found in src/melindaCustomMergeFields.js and 18 other locations - About 50 mins to fix
src/melindaCustomMergeFields.js on lines 119..123
src/melindaCustomMergeFields.js on lines 437..441
src/melindaCustomMergeFields.js on lines 803..807
src/melindaCustomMergeFields.js on lines 808..812
src/melindaCustomMergeFields.js on lines 818..822
src/melindaCustomMergeFields.js on lines 823..827
src/melindaCustomMergeFields.js on lines 828..832
src/melindaCustomMergeFields.js on lines 833..837
src/melindaCustomMergeFields.js on lines 838..842
src/melindaCustomMergeFields.js on lines 843..847
src/melindaCustomMergeFields.js on lines 848..852
src/melindaCustomMergeFields.js on lines 4900..4904
src/melindaCustomMergeFields.js on lines 4935..4939
src/melindaCustomMergeFields.js on lines 4940..4944
src/melindaCustomMergeFields.js on lines 4945..4949
src/melindaCustomMergeFields.js on lines 4968..4972
src/melindaCustomMergeFields.js on lines 5084..5088
src/melindaCustomMergeFields.js on lines 5128..5132

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 51.

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

Further Reading

Similar blocks of code found in 19 locations. Consider refactoring.
Open

    {'tag': '929',
      'repeatable': true,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
      'subfields': [{'code': 'a', 'repeatable': false}]},
Severity: Major
Found in src/melindaCustomMergeFields.js and 18 other locations - About 50 mins to fix
src/melindaCustomMergeFields.js on lines 119..123
src/melindaCustomMergeFields.js on lines 437..441
src/melindaCustomMergeFields.js on lines 803..807
src/melindaCustomMergeFields.js on lines 808..812
src/melindaCustomMergeFields.js on lines 813..817
src/melindaCustomMergeFields.js on lines 818..822
src/melindaCustomMergeFields.js on lines 823..827
src/melindaCustomMergeFields.js on lines 828..832
src/melindaCustomMergeFields.js on lines 833..837
src/melindaCustomMergeFields.js on lines 838..842
src/melindaCustomMergeFields.js on lines 843..847
src/melindaCustomMergeFields.js on lines 848..852
src/melindaCustomMergeFields.js on lines 4900..4904
src/melindaCustomMergeFields.js on lines 4940..4944
src/melindaCustomMergeFields.js on lines 4945..4949
src/melindaCustomMergeFields.js on lines 4968..4972
src/melindaCustomMergeFields.js on lines 5084..5088
src/melindaCustomMergeFields.js on lines 5128..5132

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 51.

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

Further Reading

Similar blocks of code found in 19 locations. Consider refactoring.
Open

    {'tag': '931',
      'repeatable': true,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
      'subfields': [{'code': 'a', 'repeatable': false}]},
Severity: Major
Found in src/melindaCustomMergeFields.js and 18 other locations - About 50 mins to fix
src/melindaCustomMergeFields.js on lines 119..123
src/melindaCustomMergeFields.js on lines 437..441
src/melindaCustomMergeFields.js on lines 803..807
src/melindaCustomMergeFields.js on lines 808..812
src/melindaCustomMergeFields.js on lines 813..817
src/melindaCustomMergeFields.js on lines 818..822
src/melindaCustomMergeFields.js on lines 823..827
src/melindaCustomMergeFields.js on lines 828..832
src/melindaCustomMergeFields.js on lines 833..837
src/melindaCustomMergeFields.js on lines 838..842
src/melindaCustomMergeFields.js on lines 843..847
src/melindaCustomMergeFields.js on lines 848..852
src/melindaCustomMergeFields.js on lines 4900..4904
src/melindaCustomMergeFields.js on lines 4935..4939
src/melindaCustomMergeFields.js on lines 4940..4944
src/melindaCustomMergeFields.js on lines 4968..4972
src/melindaCustomMergeFields.js on lines 5084..5088
src/melindaCustomMergeFields.js on lines 5128..5132

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 51.

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

Further Reading

Similar blocks of code found in 19 locations. Consider refactoring.
Open

    {'tag': '099',
      'repeatable': true,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
      'subfields': [{'code': 'a', 'repeatable': false}]},
Severity: Major
Found in src/melindaCustomMergeFields.js and 18 other locations - About 50 mins to fix
src/melindaCustomMergeFields.js on lines 119..123
src/melindaCustomMergeFields.js on lines 437..441
src/melindaCustomMergeFields.js on lines 803..807
src/melindaCustomMergeFields.js on lines 808..812
src/melindaCustomMergeFields.js on lines 813..817
src/melindaCustomMergeFields.js on lines 818..822
src/melindaCustomMergeFields.js on lines 823..827
src/melindaCustomMergeFields.js on lines 828..832
src/melindaCustomMergeFields.js on lines 833..837
src/melindaCustomMergeFields.js on lines 838..842
src/melindaCustomMergeFields.js on lines 843..847
src/melindaCustomMergeFields.js on lines 4900..4904
src/melindaCustomMergeFields.js on lines 4935..4939
src/melindaCustomMergeFields.js on lines 4940..4944
src/melindaCustomMergeFields.js on lines 4945..4949
src/melindaCustomMergeFields.js on lines 4968..4972
src/melindaCustomMergeFields.js on lines 5084..5088
src/melindaCustomMergeFields.js on lines 5128..5132

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 51.

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

Further Reading

Similar blocks of code found in 19 locations. Consider refactoring.
Open

    {'tag': '095',
      'repeatable': true,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
      'subfields': [{'code': 'a', 'repeatable': false}]},
Severity: Major
Found in src/melindaCustomMergeFields.js and 18 other locations - About 50 mins to fix
src/melindaCustomMergeFields.js on lines 119..123
src/melindaCustomMergeFields.js on lines 437..441
src/melindaCustomMergeFields.js on lines 803..807
src/melindaCustomMergeFields.js on lines 808..812
src/melindaCustomMergeFields.js on lines 813..817
src/melindaCustomMergeFields.js on lines 818..822
src/melindaCustomMergeFields.js on lines 823..827
src/melindaCustomMergeFields.js on lines 833..837
src/melindaCustomMergeFields.js on lines 838..842
src/melindaCustomMergeFields.js on lines 843..847
src/melindaCustomMergeFields.js on lines 848..852
src/melindaCustomMergeFields.js on lines 4900..4904
src/melindaCustomMergeFields.js on lines 4935..4939
src/melindaCustomMergeFields.js on lines 4940..4944
src/melindaCustomMergeFields.js on lines 4945..4949
src/melindaCustomMergeFields.js on lines 4968..4972
src/melindaCustomMergeFields.js on lines 5084..5088
src/melindaCustomMergeFields.js on lines 5128..5132

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 51.

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

Further Reading

Similar blocks of code found in 19 locations. Consider refactoring.
Open

    {'tag': '096',
      'repeatable': true,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
      'subfields': [{'code': 'a', 'repeatable': false}]},
Severity: Major
Found in src/melindaCustomMergeFields.js and 18 other locations - About 50 mins to fix
src/melindaCustomMergeFields.js on lines 119..123
src/melindaCustomMergeFields.js on lines 437..441
src/melindaCustomMergeFields.js on lines 803..807
src/melindaCustomMergeFields.js on lines 808..812
src/melindaCustomMergeFields.js on lines 813..817
src/melindaCustomMergeFields.js on lines 818..822
src/melindaCustomMergeFields.js on lines 823..827
src/melindaCustomMergeFields.js on lines 828..832
src/melindaCustomMergeFields.js on lines 838..842
src/melindaCustomMergeFields.js on lines 843..847
src/melindaCustomMergeFields.js on lines 848..852
src/melindaCustomMergeFields.js on lines 4900..4904
src/melindaCustomMergeFields.js on lines 4935..4939
src/melindaCustomMergeFields.js on lines 4940..4944
src/melindaCustomMergeFields.js on lines 4945..4949
src/melindaCustomMergeFields.js on lines 4968..4972
src/melindaCustomMergeFields.js on lines 5084..5088
src/melindaCustomMergeFields.js on lines 5128..5132

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 51.

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

Further Reading

Similar blocks of code found in 19 locations. Consider refactoring.
Open

    {'tag': '091',
      'repeatable': true,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
      'subfields': [{'code': 'a', 'repeatable': false}]},
Severity: Major
Found in src/melindaCustomMergeFields.js and 18 other locations - About 50 mins to fix
src/melindaCustomMergeFields.js on lines 119..123
src/melindaCustomMergeFields.js on lines 437..441
src/melindaCustomMergeFields.js on lines 803..807
src/melindaCustomMergeFields.js on lines 813..817
src/melindaCustomMergeFields.js on lines 818..822
src/melindaCustomMergeFields.js on lines 823..827
src/melindaCustomMergeFields.js on lines 828..832
src/melindaCustomMergeFields.js on lines 833..837
src/melindaCustomMergeFields.js on lines 838..842
src/melindaCustomMergeFields.js on lines 843..847
src/melindaCustomMergeFields.js on lines 848..852
src/melindaCustomMergeFields.js on lines 4900..4904
src/melindaCustomMergeFields.js on lines 4935..4939
src/melindaCustomMergeFields.js on lines 4940..4944
src/melindaCustomMergeFields.js on lines 4945..4949
src/melindaCustomMergeFields.js on lines 4968..4972
src/melindaCustomMergeFields.js on lines 5084..5088
src/melindaCustomMergeFields.js on lines 5128..5132

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 51.

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

Further Reading

Similar blocks of code found in 19 locations. Consider refactoring.
Open

    {'tag': '019',
      'repeatable': false,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
      'subfields': [{'code': 'a', 'repeatable': false}]},
Severity: Major
Found in src/melindaCustomMergeFields.js and 18 other locations - About 50 mins to fix
src/melindaCustomMergeFields.js on lines 437..441
src/melindaCustomMergeFields.js on lines 803..807
src/melindaCustomMergeFields.js on lines 808..812
src/melindaCustomMergeFields.js on lines 813..817
src/melindaCustomMergeFields.js on lines 818..822
src/melindaCustomMergeFields.js on lines 823..827
src/melindaCustomMergeFields.js on lines 828..832
src/melindaCustomMergeFields.js on lines 833..837
src/melindaCustomMergeFields.js on lines 838..842
src/melindaCustomMergeFields.js on lines 843..847
src/melindaCustomMergeFields.js on lines 848..852
src/melindaCustomMergeFields.js on lines 4900..4904
src/melindaCustomMergeFields.js on lines 4935..4939
src/melindaCustomMergeFields.js on lines 4940..4944
src/melindaCustomMergeFields.js on lines 4945..4949
src/melindaCustomMergeFields.js on lines 4968..4972
src/melindaCustomMergeFields.js on lines 5084..5088
src/melindaCustomMergeFields.js on lines 5128..5132

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 51.

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

Further Reading

Similar blocks of code found in 19 locations. Consider refactoring.
Open

    {'tag': '093',
      'repeatable': true,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
      'subfields': [{'code': 'a', 'repeatable': false}]},
Severity: Major
Found in src/melindaCustomMergeFields.js and 18 other locations - About 50 mins to fix
src/melindaCustomMergeFields.js on lines 119..123
src/melindaCustomMergeFields.js on lines 437..441
src/melindaCustomMergeFields.js on lines 803..807
src/melindaCustomMergeFields.js on lines 808..812
src/melindaCustomMergeFields.js on lines 813..817
src/melindaCustomMergeFields.js on lines 823..827
src/melindaCustomMergeFields.js on lines 828..832
src/melindaCustomMergeFields.js on lines 833..837
src/melindaCustomMergeFields.js on lines 838..842
src/melindaCustomMergeFields.js on lines 843..847
src/melindaCustomMergeFields.js on lines 848..852
src/melindaCustomMergeFields.js on lines 4900..4904
src/melindaCustomMergeFields.js on lines 4935..4939
src/melindaCustomMergeFields.js on lines 4940..4944
src/melindaCustomMergeFields.js on lines 4945..4949
src/melindaCustomMergeFields.js on lines 4968..4972
src/melindaCustomMergeFields.js on lines 5084..5088
src/melindaCustomMergeFields.js on lines 5128..5132

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 51.

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

Further Reading

Similar blocks of code found in 19 locations. Consider refactoring.
Open

    {'tag': '042',
      'repeatable': false,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
      'subfields': [{'code': 'a', 'repeatable': true}]},
Severity: Major
Found in src/melindaCustomMergeFields.js and 18 other locations - About 50 mins to fix
src/melindaCustomMergeFields.js on lines 119..123
src/melindaCustomMergeFields.js on lines 803..807
src/melindaCustomMergeFields.js on lines 808..812
src/melindaCustomMergeFields.js on lines 813..817
src/melindaCustomMergeFields.js on lines 818..822
src/melindaCustomMergeFields.js on lines 823..827
src/melindaCustomMergeFields.js on lines 828..832
src/melindaCustomMergeFields.js on lines 833..837
src/melindaCustomMergeFields.js on lines 838..842
src/melindaCustomMergeFields.js on lines 843..847
src/melindaCustomMergeFields.js on lines 848..852
src/melindaCustomMergeFields.js on lines 4900..4904
src/melindaCustomMergeFields.js on lines 4935..4939
src/melindaCustomMergeFields.js on lines 4940..4944
src/melindaCustomMergeFields.js on lines 4945..4949
src/melindaCustomMergeFields.js on lines 4968..4972
src/melindaCustomMergeFields.js on lines 5084..5088
src/melindaCustomMergeFields.js on lines 5128..5132

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 51.

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

Further Reading

Severity
Category
Status
Source
Language