NatLibFi/marc-record-validators-melinda

View on GitHub
src/field-exclusion.spec.js

Summary

Maintainability
F
2 wks
Test Coverage

File field-exclusion.spec.js has 796 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import {MarcRecord} from '@natlibfi/marc-record';
import validatorFactory from '../src/field-exclusion';

Severity: Major
Found in src/field-exclusion.spec.js - About 1 day to fix

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

        const recordInvalidDouble = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 2 other locations - About 5 hrs to fix
    src/field-exclusion.spec.js on lines 357..383
    src/field-exclusion.spec.js on lines 464..490

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

    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 recordInvalidDouble = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 2 other locations - About 5 hrs to fix
    src/field-exclusion.spec.js on lines 246..272
    src/field-exclusion.spec.js on lines 357..383

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

    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 recordInvalidDouble = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 2 other locations - About 5 hrs to fix
    src/field-exclusion.spec.js on lines 246..272
    src/field-exclusion.spec.js on lines 464..490

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

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

        it('Finds the record invalid - double', async () => {
          const validator = await validatorFactory(config);
          const {valid, message} = await validator.validate(recordInvalidDouble);
          expect({valid, message}).to.eql({valid: false, message: ['Field $648 should be excluded', 'Field $650 should be excluded']});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 2 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 298..302
    src/field-exclusion.spec.js on lines 409..413

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

    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

        it('Finds the record invalid - double', async () => {
          const validator = await validatorFactory(config);
          const {valid, message} = await validator.validate(recordInvalidDouble);
          expect({valid, message}).to.eql({valid: false, message: ['Field $500 should be excluded', 'Field $500 should be excluded']});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 2 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 409..413
    src/field-exclusion.spec.js on lines 516..520

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

    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

        it('Finds the record invalid - double', async () => {
          const validator = await validatorFactory(config);
          const {valid, message} = await validator.validate(recordInvalidDouble);
          expect({valid, message}).to.eql({valid: false, message: ['Field $648 should be excluded', 'Field $650 should be excluded']});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 2 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 298..302
    src/field-exclusion.spec.js on lines 516..520

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

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

        it('Finds the record invalid (spec)', async () => {
          const validator = await validatorFactory(config);
          const {valid, message} = await validator.validate(recordInvalid);
          expect({valid, message}).to.eql({valid: false, message: ['Field $648 should be excluded']});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 6 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 292..296
    src/field-exclusion.spec.js on lines 510..514
    src/field-exclusion.spec.js on lines 603..607
    src/field-exclusion.spec.js on lines 720..724
    src/field-exclusion.spec.js on lines 842..846
    src/field-exclusion.spec.js on lines 848..852

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

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

        it('Finds the record invalid (spec)', async () => {
          const validator = await validatorFactory(config);
          const {valid, message} = await validator.validate(recordInvalid);
          expect({valid, message}).to.eql({valid: false, message: ['Field $650 should be excluded']});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 6 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 292..296
    src/field-exclusion.spec.js on lines 403..407
    src/field-exclusion.spec.js on lines 510..514
    src/field-exclusion.spec.js on lines 603..607
    src/field-exclusion.spec.js on lines 842..846
    src/field-exclusion.spec.js on lines 848..852

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

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

        it('Finds the record invalid (spec)', async () => {
          const validator = await validatorFactory(config);
          const {valid, message} = await validator.validate(recordInvalid);
          expect({valid, message}).to.eql({valid: false, message: ['Field $500 should be excluded']});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 6 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 403..407
    src/field-exclusion.spec.js on lines 510..514
    src/field-exclusion.spec.js on lines 603..607
    src/field-exclusion.spec.js on lines 720..724
    src/field-exclusion.spec.js on lines 842..846
    src/field-exclusion.spec.js on lines 848..852

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

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

        it('Finds the record invalid (spec)', async () => {
          const validator = await validatorFactory(config);
          const {valid, message} = await validator.validate(recordInvalid);
          expect({valid, message}).to.eql({valid: false, message: ['Field $648 should be excluded']});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 6 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 292..296
    src/field-exclusion.spec.js on lines 403..407
    src/field-exclusion.spec.js on lines 603..607
    src/field-exclusion.spec.js on lines 720..724
    src/field-exclusion.spec.js on lines 842..846
    src/field-exclusion.spec.js on lines 848..852

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

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

        it('Finds the record invalid - Value', async () => {
          const validator = await validatorFactory(configValue);
          const {valid, message} = await validator.validate(recordValueInvalid);
          expect({valid, message}).to.eql({valid: false, message: ['Field $500 should be excluded']});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 6 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 292..296
    src/field-exclusion.spec.js on lines 403..407
    src/field-exclusion.spec.js on lines 510..514
    src/field-exclusion.spec.js on lines 603..607
    src/field-exclusion.spec.js on lines 720..724
    src/field-exclusion.spec.js on lines 842..846

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

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

        it('Finds the record invalid (spec)', async () => {
          const validator = await validatorFactory(config);
          const {valid, message} = await validator.validate(recordInvalid);
          expect({valid, message}).to.eql({valid: false, message: ['Field $500 should be excluded']});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 6 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 292..296
    src/field-exclusion.spec.js on lines 403..407
    src/field-exclusion.spec.js on lines 510..514
    src/field-exclusion.spec.js on lines 720..724
    src/field-exclusion.spec.js on lines 842..846
    src/field-exclusion.spec.js on lines 848..852

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

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

        it('Finds the record invalid - Ind', async () => {
          const validator = await validatorFactory(configInd);
          const {valid, message} = await validator.validate(recordIndInvalid);
          expect({valid, message}).to.eql({valid: false, message: ['Field $500 should be excluded']});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 6 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 292..296
    src/field-exclusion.spec.js on lines 403..407
    src/field-exclusion.spec.js on lines 510..514
    src/field-exclusion.spec.js on lines 603..607
    src/field-exclusion.spec.js on lines 720..724
    src/field-exclusion.spec.js on lines 848..852

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

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

        it('Finds the record valid (spec)', async () => {
          const validator = await validatorFactory(config);
          const {valid, message} = await validator.validate(recordValid);
          expect({valid, message}).to.eql({valid: true, message: []});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 6 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 286..290
    src/field-exclusion.spec.js on lines 397..401
    src/field-exclusion.spec.js on lines 597..601
    src/field-exclusion.spec.js on lines 714..718
    src/field-exclusion.spec.js on lines 830..834
    src/field-exclusion.spec.js on lines 836..840

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

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

        it('Finds the record valid - Value', async () => {
          const validator = await validatorFactory(configValue);
          const {valid, message} = await validator.validate(recordValid);
          expect({valid, message}).to.eql({valid: true, message: []});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 6 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 286..290
    src/field-exclusion.spec.js on lines 397..401
    src/field-exclusion.spec.js on lines 504..508
    src/field-exclusion.spec.js on lines 597..601
    src/field-exclusion.spec.js on lines 714..718
    src/field-exclusion.spec.js on lines 830..834

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

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

        it('Finds the record valid (spec)', async () => {
          const validator = await validatorFactory(config);
          const {valid, message} = await validator.validate(recordValid);
          expect({valid, message}).to.eql({valid: true, message: []});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 6 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 286..290
    src/field-exclusion.spec.js on lines 504..508
    src/field-exclusion.spec.js on lines 597..601
    src/field-exclusion.spec.js on lines 714..718
    src/field-exclusion.spec.js on lines 830..834
    src/field-exclusion.spec.js on lines 836..840

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

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

        it('Finds the record valid - Ind1&Ind2', async () => {
          const validator = await validatorFactory(configInd);
          const {valid, message} = await validator.validate(recordValid);
          expect({valid, message}).to.eql({valid: true, message: []});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 6 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 286..290
    src/field-exclusion.spec.js on lines 397..401
    src/field-exclusion.spec.js on lines 504..508
    src/field-exclusion.spec.js on lines 597..601
    src/field-exclusion.spec.js on lines 714..718
    src/field-exclusion.spec.js on lines 836..840

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

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

        it('Finds the record valid (spec)', async () => {
          const validator = await validatorFactory(config);
          const {valid, message} = await validator.validate(recordValid);
          expect({valid, message}).to.eql({valid: true, message: []});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 6 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 397..401
    src/field-exclusion.spec.js on lines 504..508
    src/field-exclusion.spec.js on lines 597..601
    src/field-exclusion.spec.js on lines 714..718
    src/field-exclusion.spec.js on lines 830..834
    src/field-exclusion.spec.js on lines 836..840

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

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

        it('Finds the record valid (spec)', async () => {
          const validator = await validatorFactory(config);
          const {valid, message} = await validator.validate(recordValid);
          expect({valid, message}).to.eql({valid: true, message: []});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 6 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 286..290
    src/field-exclusion.spec.js on lines 397..401
    src/field-exclusion.spec.js on lines 504..508
    src/field-exclusion.spec.js on lines 714..718
    src/field-exclusion.spec.js on lines 830..834
    src/field-exclusion.spec.js on lines 836..840

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

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

        it('Finds the record valid (spec)', async () => {
          const validator = await validatorFactory(config);
          const {valid, message} = await validator.validate(recordValid);
          expect({valid, message}).to.eql({valid: true, message: []});
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 6 other locations - About 3 hrs to fix
    src/field-exclusion.spec.js on lines 286..290
    src/field-exclusion.spec.js on lines 397..401
    src/field-exclusion.spec.js on lines 504..508
    src/field-exclusion.spec.js on lines 597..601
    src/field-exclusion.spec.js on lines 830..834
    src/field-exclusion.spec.js on lines 836..840

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

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

        const recordValid = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '500',
    Severity: Major
    Found in src/field-exclusion.spec.js and 20 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 680..693
    src/ending-punctuation.spec.js on lines 842..855
    src/ending-punctuation.spec.js on lines 876..889
    src/ending-punctuation.spec.js on lines 964..977
    src/ending-punctuation.spec.js on lines 1176..1189
    src/ending-punctuation.spec.js on lines 1412..1425
    src/ending-punctuation.spec.js on lines 1452..1465
    src/ending-punctuation.spec.js on lines 1530..1543
    src/ending-punctuation.spec.js on lines 1576..1589
    src/ending-punctuation.spec.js on lines 1591..1604
    src/ending-punctuation.spec.js on lines 1659..1672
    src/ending-punctuation.spec.js on lines 1674..1687
    src/ending-punctuation.spec.js on lines 1705..1718
    src/ending-punctuation.spec.js on lines 1720..1733
    src/ending-punctuation.spec.js on lines 1877..1890
    src/ending-punctuation.spec.js on lines 1920..1933
    src/ending-punctuation.spec.js on lines 1968..1981
    src/ending-punctuation.spec.js on lines 2047..2060
    src/ending-punctuation.spec.js on lines 2090..2103
    src/ending-punctuation.spec.js on lines 2138..2151

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

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

        it('Repairs invalid record - double', async () => {
          const validator = await validatorFactory(config);
          await validator.fix(recordInvalidDouble);
          expect(recordInvalidDouble.equalsTo(recordInvalidFixed)).to.eql(true);
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 14 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 304..308
    src/field-exclusion.spec.js on lines 415..419
    src/field-exclusion.spec.js on lines 421..425
    src/field-exclusion.spec.js on lines 522..526
    src/field-exclusion.spec.js on lines 528..532
    src/field-exclusion.spec.js on lines 609..613
    src/field-exclusion.spec.js on lines 738..742
    src/field-exclusion.spec.js on lines 744..748
    src/field-exclusion.spec.js on lines 854..858
    src/field-exclusion.spec.js on lines 860..864
    src/subfield-exclusion.spec.js on lines 289..293
    src/subfield-exclusion.spec.js on lines 340..344
    src/subfield-exclusion.spec.js on lines 423..427
    src/subfield-exclusion.spec.js on lines 508..512

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

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

        it('Repairs invalid record - Ind', async () => {
          const validator = await validatorFactory(configInd);
          await validator.fix(recordIndInvalid);
          expect(recordIndInvalid.equalsTo(recordInvalidFixed)).to.eql(true);
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 14 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 304..308
    src/field-exclusion.spec.js on lines 310..314
    src/field-exclusion.spec.js on lines 415..419
    src/field-exclusion.spec.js on lines 421..425
    src/field-exclusion.spec.js on lines 522..526
    src/field-exclusion.spec.js on lines 528..532
    src/field-exclusion.spec.js on lines 609..613
    src/field-exclusion.spec.js on lines 738..742
    src/field-exclusion.spec.js on lines 744..748
    src/field-exclusion.spec.js on lines 860..864
    src/subfield-exclusion.spec.js on lines 289..293
    src/subfield-exclusion.spec.js on lines 340..344
    src/subfield-exclusion.spec.js on lines 423..427
    src/subfield-exclusion.spec.js on lines 508..512

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

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

        it('Repairs invalid multi record', async () => {
          const validator = await validatorFactory(config);
          await validator.fix(recordInvalidMulti);
          expect(recordInvalidMulti.equalsTo(recordInvalidFixed)).to.eql(true);
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 14 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 304..308
    src/field-exclusion.spec.js on lines 310..314
    src/field-exclusion.spec.js on lines 415..419
    src/field-exclusion.spec.js on lines 421..425
    src/field-exclusion.spec.js on lines 522..526
    src/field-exclusion.spec.js on lines 528..532
    src/field-exclusion.spec.js on lines 609..613
    src/field-exclusion.spec.js on lines 744..748
    src/field-exclusion.spec.js on lines 854..858
    src/field-exclusion.spec.js on lines 860..864
    src/subfield-exclusion.spec.js on lines 289..293
    src/subfield-exclusion.spec.js on lines 340..344
    src/subfield-exclusion.spec.js on lines 423..427
    src/subfield-exclusion.spec.js on lines 508..512

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

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

        it('Repairs invalid record', async () => {
          const validator = await validatorFactory(config);
          await validator.fix(recordInvalid);
          expect(recordInvalid.equalsTo(recordInvalidFixed)).to.eql(true);
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 14 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 304..308
    src/field-exclusion.spec.js on lines 310..314
    src/field-exclusion.spec.js on lines 415..419
    src/field-exclusion.spec.js on lines 421..425
    src/field-exclusion.spec.js on lines 528..532
    src/field-exclusion.spec.js on lines 609..613
    src/field-exclusion.spec.js on lines 738..742
    src/field-exclusion.spec.js on lines 744..748
    src/field-exclusion.spec.js on lines 854..858
    src/field-exclusion.spec.js on lines 860..864
    src/subfield-exclusion.spec.js on lines 289..293
    src/subfield-exclusion.spec.js on lines 340..344
    src/subfield-exclusion.spec.js on lines 423..427
    src/subfield-exclusion.spec.js on lines 508..512

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

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

        it('Repairs invalid record - double', async () => {
          const validator = await validatorFactory(config);
          await validator.fix(recordInvalidDouble);
          expect(recordInvalidDouble.equalsTo(recordInvalidFixed)).to.eql(true);
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 14 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 304..308
    src/field-exclusion.spec.js on lines 310..314
    src/field-exclusion.spec.js on lines 415..419
    src/field-exclusion.spec.js on lines 421..425
    src/field-exclusion.spec.js on lines 522..526
    src/field-exclusion.spec.js on lines 609..613
    src/field-exclusion.spec.js on lines 738..742
    src/field-exclusion.spec.js on lines 744..748
    src/field-exclusion.spec.js on lines 854..858
    src/field-exclusion.spec.js on lines 860..864
    src/subfield-exclusion.spec.js on lines 289..293
    src/subfield-exclusion.spec.js on lines 340..344
    src/subfield-exclusion.spec.js on lines 423..427
    src/subfield-exclusion.spec.js on lines 508..512

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

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

        it('Repairs invalid record', async () => {
          const validator = await validatorFactory(config);
          await validator.fix(recordInvalid);
          expect(recordInvalid.equalsTo(recordInvalidFixed)).to.eql(true);
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 14 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 310..314
    src/field-exclusion.spec.js on lines 415..419
    src/field-exclusion.spec.js on lines 421..425
    src/field-exclusion.spec.js on lines 522..526
    src/field-exclusion.spec.js on lines 528..532
    src/field-exclusion.spec.js on lines 609..613
    src/field-exclusion.spec.js on lines 738..742
    src/field-exclusion.spec.js on lines 744..748
    src/field-exclusion.spec.js on lines 854..858
    src/field-exclusion.spec.js on lines 860..864
    src/subfield-exclusion.spec.js on lines 289..293
    src/subfield-exclusion.spec.js on lines 340..344
    src/subfield-exclusion.spec.js on lines 423..427
    src/subfield-exclusion.spec.js on lines 508..512

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

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

        it('Repairs invalid record', async () => {
          const validator = await validatorFactory(config);
          await validator.fix(recordInvalid);
          expect(recordInvalid.equalsTo(recordInvalidFixed)).to.eql(true);
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 14 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 304..308
    src/field-exclusion.spec.js on lines 310..314
    src/field-exclusion.spec.js on lines 421..425
    src/field-exclusion.spec.js on lines 522..526
    src/field-exclusion.spec.js on lines 528..532
    src/field-exclusion.spec.js on lines 609..613
    src/field-exclusion.spec.js on lines 738..742
    src/field-exclusion.spec.js on lines 744..748
    src/field-exclusion.spec.js on lines 854..858
    src/field-exclusion.spec.js on lines 860..864
    src/subfield-exclusion.spec.js on lines 289..293
    src/subfield-exclusion.spec.js on lines 340..344
    src/subfield-exclusion.spec.js on lines 423..427
    src/subfield-exclusion.spec.js on lines 508..512

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

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

        it('Repairs invalid record', async () => {
          const validator = await validatorFactory(config);
          await validator.fix(recordInvalid);
          expect(recordInvalid.equalsTo(recordInvalidFixed)).to.eql(true);
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 14 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 304..308
    src/field-exclusion.spec.js on lines 310..314
    src/field-exclusion.spec.js on lines 415..419
    src/field-exclusion.spec.js on lines 421..425
    src/field-exclusion.spec.js on lines 522..526
    src/field-exclusion.spec.js on lines 528..532
    src/field-exclusion.spec.js on lines 738..742
    src/field-exclusion.spec.js on lines 744..748
    src/field-exclusion.spec.js on lines 854..858
    src/field-exclusion.spec.js on lines 860..864
    src/subfield-exclusion.spec.js on lines 289..293
    src/subfield-exclusion.spec.js on lines 340..344
    src/subfield-exclusion.spec.js on lines 423..427
    src/subfield-exclusion.spec.js on lines 508..512

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

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

        it('Repairs invalid record', async () => {
          const validator = await validatorFactory(config);
          await validator.fix(recordInvalid);
          expect(recordInvalid.equalsTo(recordInvalidFixed)).to.eql(true);
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 14 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 304..308
    src/field-exclusion.spec.js on lines 310..314
    src/field-exclusion.spec.js on lines 415..419
    src/field-exclusion.spec.js on lines 421..425
    src/field-exclusion.spec.js on lines 522..526
    src/field-exclusion.spec.js on lines 528..532
    src/field-exclusion.spec.js on lines 609..613
    src/field-exclusion.spec.js on lines 738..742
    src/field-exclusion.spec.js on lines 854..858
    src/field-exclusion.spec.js on lines 860..864
    src/subfield-exclusion.spec.js on lines 289..293
    src/subfield-exclusion.spec.js on lines 340..344
    src/subfield-exclusion.spec.js on lines 423..427
    src/subfield-exclusion.spec.js on lines 508..512

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

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

        it('Repairs invalid record - Value', async () => {
          const validator = await validatorFactory(configValue);
          await validator.fix(recordValueInvalid);
          expect(recordValueInvalid.equalsTo(recordInvalidFixed)).to.eql(true);
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 14 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 304..308
    src/field-exclusion.spec.js on lines 310..314
    src/field-exclusion.spec.js on lines 415..419
    src/field-exclusion.spec.js on lines 421..425
    src/field-exclusion.spec.js on lines 522..526
    src/field-exclusion.spec.js on lines 528..532
    src/field-exclusion.spec.js on lines 609..613
    src/field-exclusion.spec.js on lines 738..742
    src/field-exclusion.spec.js on lines 744..748
    src/field-exclusion.spec.js on lines 854..858
    src/subfield-exclusion.spec.js on lines 289..293
    src/subfield-exclusion.spec.js on lines 340..344
    src/subfield-exclusion.spec.js on lines 423..427
    src/subfield-exclusion.spec.js on lines 508..512

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

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

        it('Repairs invalid record - double', async () => {
          const validator = await validatorFactory(config);
          await validator.fix(recordInvalidDouble);
          expect(recordInvalidDouble.equalsTo(recordInvalidFixed)).to.eql(true);
        });
    Severity: Major
    Found in src/field-exclusion.spec.js and 14 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 304..308
    src/field-exclusion.spec.js on lines 310..314
    src/field-exclusion.spec.js on lines 415..419
    src/field-exclusion.spec.js on lines 522..526
    src/field-exclusion.spec.js on lines 528..532
    src/field-exclusion.spec.js on lines 609..613
    src/field-exclusion.spec.js on lines 738..742
    src/field-exclusion.spec.js on lines 744..748
    src/field-exclusion.spec.js on lines 854..858
    src/field-exclusion.spec.js on lines 860..864
    src/subfield-exclusion.spec.js on lines 289..293
    src/subfield-exclusion.spec.js on lines 340..344
    src/subfield-exclusion.spec.js on lines 423..427
    src/subfield-exclusion.spec.js on lines 508..512

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

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

        const recordValid = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 8 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 279..289
    src/ending-punctuation.spec.js on lines 373..383
    src/ending-punctuation.spec.js on lines 815..825
    src/ending-punctuation.spec.js on lines 922..932
    src/ending-punctuation.spec.js on lines 1103..1113
    src/ending-punctuation.spec.js on lines 1164..1174
    src/ending-punctuation.spec.js on lines 1400..1410
    src/ending-punctuation.spec.js on lines 1440..1450

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

    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

          try {
            await validatorFactory(config);
          } catch (error) {
            expect(error).to.be.an('error').with.property('message', 'Configuration not valid - invalid data type for: code');
          }
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 49..53
    src/field-exclusion.spec.js on lines 62..66
    src/field-exclusion.spec.js on lines 92..96
    src/field-exclusion.spec.js on lines 109..113
    src/field-exclusion.spec.js on lines 124..128
    src/field-exclusion.spec.js on lines 142..146
    src/field-exclusion.spec.js on lines 161..165
    src/field-exclusion.spec.js on lines 179..183
    src/field-exclusion.spec.js on lines 198..202

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

    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

          try {
            await validatorFactory(config);
          } catch (error) {
            expect(error).to.be.an('error').with.property('message', 'Configuration array not provided');
          }
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 49..53
    src/field-exclusion.spec.js on lines 77..81
    src/field-exclusion.spec.js on lines 92..96
    src/field-exclusion.spec.js on lines 109..113
    src/field-exclusion.spec.js on lines 124..128
    src/field-exclusion.spec.js on lines 142..146
    src/field-exclusion.spec.js on lines 161..165
    src/field-exclusion.spec.js on lines 179..183
    src/field-exclusion.spec.js on lines 198..202

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

    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

          try {
            await validatorFactory(config);
          } catch (error) {
            expect(error).to.be.an('error').with.property('message', 'Configuration not valid - missing mandatory element: tag');
          }
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 49..53
    src/field-exclusion.spec.js on lines 62..66
    src/field-exclusion.spec.js on lines 77..81
    src/field-exclusion.spec.js on lines 92..96
    src/field-exclusion.spec.js on lines 109..113
    src/field-exclusion.spec.js on lines 142..146
    src/field-exclusion.spec.js on lines 161..165
    src/field-exclusion.spec.js on lines 179..183
    src/field-exclusion.spec.js on lines 198..202

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

    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

          try {
            await validatorFactory(config);
          } catch (error) {
            expect(error).to.be.an('error').with.property('message', 'Configuration not valid - subfield: /9/,/^(?!FENNI<KEEP>).*$/ not object');
          }
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 49..53
    src/field-exclusion.spec.js on lines 62..66
    src/field-exclusion.spec.js on lines 77..81
    src/field-exclusion.spec.js on lines 92..96
    src/field-exclusion.spec.js on lines 109..113
    src/field-exclusion.spec.js on lines 124..128
    src/field-exclusion.spec.js on lines 161..165
    src/field-exclusion.spec.js on lines 179..183
    src/field-exclusion.spec.js on lines 198..202

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

    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

          try {
            await validatorFactory(config);
          } catch (error) {
            expect(error).to.be.an('error').with.property('message', 'Configuration not valid - excluded element');
          }
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 49..53
    src/field-exclusion.spec.js on lines 62..66
    src/field-exclusion.spec.js on lines 77..81
    src/field-exclusion.spec.js on lines 92..96
    src/field-exclusion.spec.js on lines 124..128
    src/field-exclusion.spec.js on lines 142..146
    src/field-exclusion.spec.js on lines 161..165
    src/field-exclusion.spec.js on lines 179..183
    src/field-exclusion.spec.js on lines 198..202

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

    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

          try {
            await validatorFactory(config);
          } catch (error) {
            expect(error).to.be.an('error').with.property('message', 'Configuration not valid - invalid data type for: value');
          }
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 49..53
    src/field-exclusion.spec.js on lines 62..66
    src/field-exclusion.spec.js on lines 77..81
    src/field-exclusion.spec.js on lines 109..113
    src/field-exclusion.spec.js on lines 124..128
    src/field-exclusion.spec.js on lines 142..146
    src/field-exclusion.spec.js on lines 161..165
    src/field-exclusion.spec.js on lines 179..183
    src/field-exclusion.spec.js on lines 198..202

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

    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

          try {
            await validatorFactory(config);
          } catch (error) {
            expect(error).to.be.an('error').with.property('message', 'Configuration not valid - invalid data type for: tag');
          }
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 62..66
    src/field-exclusion.spec.js on lines 77..81
    src/field-exclusion.spec.js on lines 92..96
    src/field-exclusion.spec.js on lines 109..113
    src/field-exclusion.spec.js on lines 124..128
    src/field-exclusion.spec.js on lines 142..146
    src/field-exclusion.spec.js on lines 161..165
    src/field-exclusion.spec.js on lines 179..183
    src/field-exclusion.spec.js on lines 198..202

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

    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

          try {
            await validatorFactory(config);
          } catch (error) {
            expect(error).to.be.an('error').with.property('message', 'Configuration not valid - subfield: /9/ not object');
          }
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 49..53
    src/field-exclusion.spec.js on lines 62..66
    src/field-exclusion.spec.js on lines 77..81
    src/field-exclusion.spec.js on lines 92..96
    src/field-exclusion.spec.js on lines 109..113
    src/field-exclusion.spec.js on lines 124..128
    src/field-exclusion.spec.js on lines 142..146
    src/field-exclusion.spec.js on lines 179..183
    src/field-exclusion.spec.js on lines 198..202

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

    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

          try {
            await validatorFactory(config);
          } catch (error) {
            expect(error).to.be.an('error').with.property('message', 'Configuration not valid - unidentified value: unidentified');
          }
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 49..53
    src/field-exclusion.spec.js on lines 62..66
    src/field-exclusion.spec.js on lines 77..81
    src/field-exclusion.spec.js on lines 92..96
    src/field-exclusion.spec.js on lines 109..113
    src/field-exclusion.spec.js on lines 124..128
    src/field-exclusion.spec.js on lines 142..146
    src/field-exclusion.spec.js on lines 161..165
    src/field-exclusion.spec.js on lines 179..183

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

    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

          try {
            await validatorFactory(config);
          } catch (error) {
            expect(error).to.be.an('error').with.property('message', 'Configuration not valid - missing mandatory element: code');
          }
    Severity: Major
    Found in src/field-exclusion.spec.js and 9 other locations - About 1 hr to fix
    src/field-exclusion.spec.js on lines 49..53
    src/field-exclusion.spec.js on lines 62..66
    src/field-exclusion.spec.js on lines 77..81
    src/field-exclusion.spec.js on lines 92..96
    src/field-exclusion.spec.js on lines 109..113
    src/field-exclusion.spec.js on lines 124..128
    src/field-exclusion.spec.js on lines 142..146
    src/field-exclusion.spec.js on lines 161..165
    src/field-exclusion.spec.js on lines 198..202

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

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

        const recordInvalidFixed = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 16 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 149..159
    src/ending-punctuation.spec.js on lines 1270..1280
    src/ending-punctuation.spec.js on lines 1333..1343
    src/ending-punctuation.spec.js on lines 1908..1918
    src/ending-punctuation.spec.js on lines 2078..2088
    src/ending-punctuation.spec.js on lines 2335..2345
    src/ending-punctuation.spec.js on lines 2376..2386
    src/field-exclusion.spec.js on lines 214..224
    src/field-exclusion.spec.js on lines 274..284
    src/field-exclusion.spec.js on lines 325..335
    src/field-exclusion.spec.js on lines 385..395
    src/field-exclusion.spec.js on lines 492..502
    src/field-exclusion.spec.js on lines 702..712
    src/field-exclusion.spec.js on lines 818..828
    src/field-exclusion.spec.js on lines 876..886
    src/subfield-exclusion.spec.js on lines 322..332

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

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

        const recordInvalidFixed = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 16 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 149..159
    src/ending-punctuation.spec.js on lines 1270..1280
    src/ending-punctuation.spec.js on lines 1333..1343
    src/ending-punctuation.spec.js on lines 1908..1918
    src/ending-punctuation.spec.js on lines 2078..2088
    src/ending-punctuation.spec.js on lines 2335..2345
    src/ending-punctuation.spec.js on lines 2376..2386
    src/field-exclusion.spec.js on lines 214..224
    src/field-exclusion.spec.js on lines 274..284
    src/field-exclusion.spec.js on lines 325..335
    src/field-exclusion.spec.js on lines 492..502
    src/field-exclusion.spec.js on lines 585..595
    src/field-exclusion.spec.js on lines 702..712
    src/field-exclusion.spec.js on lines 818..828
    src/field-exclusion.spec.js on lines 876..886
    src/subfield-exclusion.spec.js on lines 322..332

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

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

        const recordValid = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 16 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 149..159
    src/ending-punctuation.spec.js on lines 1270..1280
    src/ending-punctuation.spec.js on lines 1333..1343
    src/ending-punctuation.spec.js on lines 1908..1918
    src/ending-punctuation.spec.js on lines 2078..2088
    src/ending-punctuation.spec.js on lines 2335..2345
    src/ending-punctuation.spec.js on lines 2376..2386
    src/field-exclusion.spec.js on lines 214..224
    src/field-exclusion.spec.js on lines 274..284
    src/field-exclusion.spec.js on lines 385..395
    src/field-exclusion.spec.js on lines 492..502
    src/field-exclusion.spec.js on lines 585..595
    src/field-exclusion.spec.js on lines 702..712
    src/field-exclusion.spec.js on lines 818..828
    src/field-exclusion.spec.js on lines 876..886
    src/subfield-exclusion.spec.js on lines 322..332

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

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

        const recordInvalidFixed = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 16 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 149..159
    src/ending-punctuation.spec.js on lines 1270..1280
    src/ending-punctuation.spec.js on lines 1333..1343
    src/ending-punctuation.spec.js on lines 1908..1918
    src/ending-punctuation.spec.js on lines 2078..2088
    src/ending-punctuation.spec.js on lines 2335..2345
    src/ending-punctuation.spec.js on lines 2376..2386
    src/field-exclusion.spec.js on lines 214..224
    src/field-exclusion.spec.js on lines 274..284
    src/field-exclusion.spec.js on lines 325..335
    src/field-exclusion.spec.js on lines 385..395
    src/field-exclusion.spec.js on lines 492..502
    src/field-exclusion.spec.js on lines 585..595
    src/field-exclusion.spec.js on lines 702..712
    src/field-exclusion.spec.js on lines 876..886
    src/subfield-exclusion.spec.js on lines 322..332

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

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

        const recordInvalidFixed = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 16 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 149..159
    src/ending-punctuation.spec.js on lines 1270..1280
    src/ending-punctuation.spec.js on lines 1333..1343
    src/ending-punctuation.spec.js on lines 1908..1918
    src/ending-punctuation.spec.js on lines 2078..2088
    src/ending-punctuation.spec.js on lines 2335..2345
    src/ending-punctuation.spec.js on lines 2376..2386
    src/field-exclusion.spec.js on lines 214..224
    src/field-exclusion.spec.js on lines 325..335
    src/field-exclusion.spec.js on lines 385..395
    src/field-exclusion.spec.js on lines 492..502
    src/field-exclusion.spec.js on lines 585..595
    src/field-exclusion.spec.js on lines 702..712
    src/field-exclusion.spec.js on lines 818..828
    src/field-exclusion.spec.js on lines 876..886
    src/subfield-exclusion.spec.js on lines 322..332

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

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

        const recordInvalidFixed = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 16 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 149..159
    src/ending-punctuation.spec.js on lines 1270..1280
    src/ending-punctuation.spec.js on lines 1333..1343
    src/ending-punctuation.spec.js on lines 1908..1918
    src/ending-punctuation.spec.js on lines 2078..2088
    src/ending-punctuation.spec.js on lines 2335..2345
    src/ending-punctuation.spec.js on lines 2376..2386
    src/field-exclusion.spec.js on lines 214..224
    src/field-exclusion.spec.js on lines 274..284
    src/field-exclusion.spec.js on lines 325..335
    src/field-exclusion.spec.js on lines 385..395
    src/field-exclusion.spec.js on lines 492..502
    src/field-exclusion.spec.js on lines 585..595
    src/field-exclusion.spec.js on lines 818..828
    src/field-exclusion.spec.js on lines 876..886
    src/subfield-exclusion.spec.js on lines 322..332

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

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

          const record = new MarcRecord({
            leader: '00000cam^a22003372i^4500',
            fields: [
              {
                tag: '041',
    Severity: Major
    Found in src/field-exclusion.spec.js and 16 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 149..159
    src/ending-punctuation.spec.js on lines 1270..1280
    src/ending-punctuation.spec.js on lines 1333..1343
    src/ending-punctuation.spec.js on lines 1908..1918
    src/ending-punctuation.spec.js on lines 2078..2088
    src/ending-punctuation.spec.js on lines 2335..2345
    src/ending-punctuation.spec.js on lines 2376..2386
    src/field-exclusion.spec.js on lines 214..224
    src/field-exclusion.spec.js on lines 274..284
    src/field-exclusion.spec.js on lines 325..335
    src/field-exclusion.spec.js on lines 385..395
    src/field-exclusion.spec.js on lines 492..502
    src/field-exclusion.spec.js on lines 585..595
    src/field-exclusion.spec.js on lines 702..712
    src/field-exclusion.spec.js on lines 818..828
    src/subfield-exclusion.spec.js on lines 322..332

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

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

        const recordValid = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 16 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 149..159
    src/ending-punctuation.spec.js on lines 1270..1280
    src/ending-punctuation.spec.js on lines 1333..1343
    src/ending-punctuation.spec.js on lines 1908..1918
    src/ending-punctuation.spec.js on lines 2078..2088
    src/ending-punctuation.spec.js on lines 2335..2345
    src/ending-punctuation.spec.js on lines 2376..2386
    src/field-exclusion.spec.js on lines 274..284
    src/field-exclusion.spec.js on lines 325..335
    src/field-exclusion.spec.js on lines 385..395
    src/field-exclusion.spec.js on lines 492..502
    src/field-exclusion.spec.js on lines 585..595
    src/field-exclusion.spec.js on lines 702..712
    src/field-exclusion.spec.js on lines 818..828
    src/field-exclusion.spec.js on lines 876..886
    src/subfield-exclusion.spec.js on lines 322..332

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

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

        const recordInvalidFixed = new MarcRecord({
          leader: 'foo',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/field-exclusion.spec.js and 16 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 149..159
    src/ending-punctuation.spec.js on lines 1270..1280
    src/ending-punctuation.spec.js on lines 1333..1343
    src/ending-punctuation.spec.js on lines 1908..1918
    src/ending-punctuation.spec.js on lines 2078..2088
    src/ending-punctuation.spec.js on lines 2335..2345
    src/ending-punctuation.spec.js on lines 2376..2386
    src/field-exclusion.spec.js on lines 214..224
    src/field-exclusion.spec.js on lines 274..284
    src/field-exclusion.spec.js on lines 325..335
    src/field-exclusion.spec.js on lines 385..395
    src/field-exclusion.spec.js on lines 585..595
    src/field-exclusion.spec.js on lines 702..712
    src/field-exclusion.spec.js on lines 818..828
    src/field-exclusion.spec.js on lines 876..886
    src/subfield-exclusion.spec.js on lines 322..332

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

    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

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

          const config = [
            {
              tag: /^500$/u,
              unidentified: /^500$/u,
              subfields: [
    Severity: Minor
    Found in src/field-exclusion.spec.js and 1 other location - About 30 mins to fix
    src/subfield-exclusion.spec.js on lines 195..204

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

    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

    There are no issues that match your filters.

    Category
    Status