NatLibFi/marc-record-validators-melinda

View on GitHub

Showing 1,137 of 1,137 total issues

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

      expect(record.fields).to.eql([
        {
          tag: '008',
          value: '151118t20162016fi^a|||^^^^^^^|0|^0|eng|^'
        },
Severity: Major
Found in src/item-language.spec.js and 2 other locations - About 3 hrs to fix
src/isbn-issn.spec.js on lines 356..360
src/item-language.spec.js on lines 192..214

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

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

      expect(record.fields).to.eql([
        {tag: '005', value: 'whatever'},
        {tag: '020', ind1: ' ', ind2: ' ', subfields: [{code: 'q', value: 'sidottu'}]},
        {tag: '024', ind1: ' ', ind2: ' ', subfields: [{code: 'a', value: ' 9786003770171'}]}
      ]);
Severity: Major
Found in src/isbn-issn.spec.js and 2 other locations - About 3 hrs to fix
src/item-language.spec.js on lines 192..214
src/item-language.spec.js on lines 240..262

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

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

      expect(record.fields).to.eql([
        {
          tag: '008',
          value: '151118t20162016fi^a|||^^^^^^^|0|^0|eng|^'
        },
Severity: Major
Found in src/item-language.spec.js and 2 other locations - About 3 hrs to fix
src/isbn-issn.spec.js on lines 356..360
src/item-language.spec.js on lines 240..262

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

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

Function default has 88 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function (config) {
  if (!Array.isArray(config)) {
    throw new TypeError('Configuration array not provided');
  }

Severity: Major
Found in src/subfield-exclusion.js - About 3 hrs to fix

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

        const recordInvalid = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 226..244
    src/field-exclusion.spec.js on lines 337..355
    src/field-exclusion.spec.js on lines 444..462
    src/field-exclusion.spec.js on lines 545..563
    src/field-exclusion.spec.js on lines 625..643
    src/field-exclusion.spec.js on lines 645..663
    src/field-exclusion.spec.js on lines 783..801
    src/field-structure.spec.js on lines 386..414
    src/subfield-exclusion.spec.js on lines 459..477

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

    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 10 locations. Consider refactoring.
    Open

        const recordIndInvalid = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 226..244
    src/field-exclusion.spec.js on lines 337..355
    src/field-exclusion.spec.js on lines 444..462
    src/field-exclusion.spec.js on lines 545..563
    src/field-exclusion.spec.js on lines 565..583
    src/field-exclusion.spec.js on lines 625..643
    src/field-exclusion.spec.js on lines 645..663
    src/field-structure.spec.js on lines 386..414
    src/subfield-exclusion.spec.js on lines 459..477

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

    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 2 locations. Consider refactoring.
    Open

        const recordInvalid = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '100',
    Severity: Major
    Found in src/subfield-exclusion.spec.js and 1 other location - About 3 hrs to fix
    src/subfield-exclusion.spec.js on lines 374..392

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

    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 10 locations. Consider refactoring.
    Open

        const recordIndInvalid = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/subfield-exclusion.spec.js and 9 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 226..244
    src/field-exclusion.spec.js on lines 337..355
    src/field-exclusion.spec.js on lines 444..462
    src/field-exclusion.spec.js on lines 545..563
    src/field-exclusion.spec.js on lines 565..583
    src/field-exclusion.spec.js on lines 625..643
    src/field-exclusion.spec.js on lines 645..663
    src/field-exclusion.spec.js on lines 783..801
    src/field-structure.spec.js on lines 386..414

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

    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 10 locations. Consider refactoring.
    Open

        const recordInvalid = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 337..355
    src/field-exclusion.spec.js on lines 444..462
    src/field-exclusion.spec.js on lines 545..563
    src/field-exclusion.spec.js on lines 565..583
    src/field-exclusion.spec.js on lines 625..643
    src/field-exclusion.spec.js on lines 645..663
    src/field-exclusion.spec.js on lines 783..801
    src/field-structure.spec.js on lines 386..414
    src/subfield-exclusion.spec.js on lines 459..477

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

    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 10 locations. Consider refactoring.
    Open

        const recordValid = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 226..244
    src/field-exclusion.spec.js on lines 337..355
    src/field-exclusion.spec.js on lines 444..462
    src/field-exclusion.spec.js on lines 565..583
    src/field-exclusion.spec.js on lines 625..643
    src/field-exclusion.spec.js on lines 645..663
    src/field-exclusion.spec.js on lines 783..801
    src/field-structure.spec.js on lines 386..414
    src/subfield-exclusion.spec.js on lines 459..477

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

    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 10 locations. Consider refactoring.
    Open

        const recordInvalid = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 226..244
    src/field-exclusion.spec.js on lines 337..355
    src/field-exclusion.spec.js on lines 444..462
    src/field-exclusion.spec.js on lines 545..563
    src/field-exclusion.spec.js on lines 565..583
    src/field-exclusion.spec.js on lines 625..643
    src/field-exclusion.spec.js on lines 783..801
    src/field-structure.spec.js on lines 386..414
    src/subfield-exclusion.spec.js on lines 459..477

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

    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 2 locations. Consider refactoring.
    Open

        const recordInvalid = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '210',
    Severity: Major
    Found in src/subfield-exclusion.spec.js and 1 other location - About 3 hrs to fix
    src/subfield-exclusion.spec.js on lines 240..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 105.

    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 10 locations. Consider refactoring.
    Open

        const recordInvalid = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 226..244
    src/field-exclusion.spec.js on lines 337..355
    src/field-exclusion.spec.js on lines 545..563
    src/field-exclusion.spec.js on lines 565..583
    src/field-exclusion.spec.js on lines 625..643
    src/field-exclusion.spec.js on lines 645..663
    src/field-exclusion.spec.js on lines 783..801
    src/field-structure.spec.js on lines 386..414
    src/subfield-exclusion.spec.js on lines 459..477

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

    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 10 locations. Consider refactoring.
    Open

        const recordValid = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 226..244
    src/field-exclusion.spec.js on lines 337..355
    src/field-exclusion.spec.js on lines 444..462
    src/field-exclusion.spec.js on lines 545..563
    src/field-exclusion.spec.js on lines 565..583
    src/field-exclusion.spec.js on lines 645..663
    src/field-exclusion.spec.js on lines 783..801
    src/field-structure.spec.js on lines 386..414
    src/subfield-exclusion.spec.js on lines 459..477

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

    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 10 locations. Consider refactoring.
    Open

        const recordInvalid = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 226..244
    src/field-exclusion.spec.js on lines 444..462
    src/field-exclusion.spec.js on lines 545..563
    src/field-exclusion.spec.js on lines 565..583
    src/field-exclusion.spec.js on lines 625..643
    src/field-exclusion.spec.js on lines 645..663
    src/field-exclusion.spec.js on lines 783..801
    src/field-structure.spec.js on lines 386..414
    src/subfield-exclusion.spec.js on lines 459..477

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

    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 10 locations. Consider refactoring.
    Open

        const recordInvalidMissing = new MarcRecord({
          leader: '',
          fields: [
            {
              tag: '100',
    Severity: Major
    Found in src/field-structure.spec.js and 9 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 226..244
    src/field-exclusion.spec.js on lines 337..355
    src/field-exclusion.spec.js on lines 444..462
    src/field-exclusion.spec.js on lines 545..563
    src/field-exclusion.spec.js on lines 565..583
    src/field-exclusion.spec.js on lines 625..643
    src/field-exclusion.spec.js on lines 645..663
    src/field-exclusion.spec.js on lines 783..801
    src/subfield-exclusion.spec.js on lines 459..477

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

    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

    Function default has 87 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function () {
      return {
        description, fix, validate
      };
    
    
    Severity: Major
    Found in src/cyrillux-usemarcon-replacement.js - About 3 hrs to fix

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

        function validateField(field, res) {
          if (!field.subfields) {
            return;
          }
          const orig = fieldToString(field);
      Severity: Major
      Found in src/subfieldValueNormalizations.js and 1 other location - About 3 hrs to fix
      src/normalize-utf8-diacritics.js on lines 62..75

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

      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 2 locations. Consider refactoring.
      Open

        function validateField(field, res) {
          if (!field.subfields) {
            return;
          }
          const orig = fieldToString(field);
      Severity: Major
      Found in src/normalize-utf8-diacritics.js and 1 other location - About 3 hrs to fix
      src/subfieldValueNormalizations.js on lines 38..51

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

      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

      Function default has 86 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function () {
      
        return {
          description: 'Validator for updating mismatching f007 based on f300 (DVD/Bluray) (MRA-613)',
          validate, fix
      Severity: Major
      Found in src/sync-007-and-300.js - About 3 hrs to fix
        Severity
        Category
        Status
        Source
        Language