NatLibFi/marc-record-validators-melinda

View on GitHub
src/ending-punctuation.spec.js

Summary

Maintainability
F
2 mos
Test Coverage

File ending-punctuation.spec.js has 2265 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/ending-punctuation';

Severity: Major
Found in src/ending-punctuation.spec.js - About 6 days to fix

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

        const recordBroken = new MarcRecord({
          leader: '',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 1 other location - About 7 hrs to fix
    src/ending-punctuation.spec.js on lines 43..71

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        const recordInvalid = new MarcRecord({
          leader: '',
          fields: [
            {
              tag: '245',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 1 other location - About 7 hrs to fix
    src/ending-punctuation.spec.js on lines 72..100

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

          const recordValidComplex = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '340',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 1 other location - About 4 hrs to fix
    src/ending-punctuation.spec.js on lines 979..996

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

          const recordInvalidComplexDMissing = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '340',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 1 other location - About 4 hrs to fix
    src/ending-punctuation.spec.js on lines 857..874

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

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

          it('Repairs the invalid record - Add punc $b', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid);
            expect(recordInvalid.equalsTo(recordValid)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 431..440
    src/ending-punctuation.spec.js on lines 611..620
    src/ending-punctuation.spec.js on lines 786..795
    src/ending-punctuation.spec.js on lines 1044..1053
    src/ending-punctuation.spec.js on lines 1210..1219
    src/ending-punctuation.spec.js on lines 1373..1382
    src/ending-punctuation.spec.js on lines 1486..1495
    src/ending-punctuation.spec.js on lines 1790..1799
    src/ending-punctuation.spec.js on lines 2226..2235
    src/ending-punctuation.spec.js on lines 2407..2416
    src/ending-punctuation.spec.js on lines 2533..2542

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

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

          it('Repairs the invalid record - Add punc $b', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidSimple);
            expect(recordInvalidSimple.equalsTo(recordValidSimple)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 220..229
    src/ending-punctuation.spec.js on lines 431..440
    src/ending-punctuation.spec.js on lines 611..620
    src/ending-punctuation.spec.js on lines 786..795
    src/ending-punctuation.spec.js on lines 1044..1053
    src/ending-punctuation.spec.js on lines 1210..1219
    src/ending-punctuation.spec.js on lines 1373..1382
    src/ending-punctuation.spec.js on lines 1486..1495
    src/ending-punctuation.spec.js on lines 1790..1799
    src/ending-punctuation.spec.js on lines 2226..2235
    src/ending-punctuation.spec.js on lines 2407..2416

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

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

          it('Repairs the invalid record - Add punc $a (only)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidA);
            expect(recordInvalidA.equalsTo(recordInvalidA)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 220..229
    src/ending-punctuation.spec.js on lines 431..440
    src/ending-punctuation.spec.js on lines 611..620
    src/ending-punctuation.spec.js on lines 786..795
    src/ending-punctuation.spec.js on lines 1210..1219
    src/ending-punctuation.spec.js on lines 1373..1382
    src/ending-punctuation.spec.js on lines 1486..1495
    src/ending-punctuation.spec.js on lines 1790..1799
    src/ending-punctuation.spec.js on lines 2226..2235
    src/ending-punctuation.spec.js on lines 2407..2416
    src/ending-punctuation.spec.js on lines 2533..2542

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

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

          it('Repairs the invalid record - Add punc $a (only)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid);
            expect(recordInvalid.equalsTo(recordValid)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 220..229
    src/ending-punctuation.spec.js on lines 431..440
    src/ending-punctuation.spec.js on lines 611..620
    src/ending-punctuation.spec.js on lines 786..795
    src/ending-punctuation.spec.js on lines 1044..1053
    src/ending-punctuation.spec.js on lines 1210..1219
    src/ending-punctuation.spec.js on lines 1373..1382
    src/ending-punctuation.spec.js on lines 1790..1799
    src/ending-punctuation.spec.js on lines 2226..2235
    src/ending-punctuation.spec.js on lines 2407..2416
    src/ending-punctuation.spec.js on lines 2533..2542

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

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

          it('Repairs the invalid record - Add punc $a (only)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid);
            expect(recordInvalid.equalsTo(recordValid)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 220..229
    src/ending-punctuation.spec.js on lines 431..440
    src/ending-punctuation.spec.js on lines 611..620
    src/ending-punctuation.spec.js on lines 786..795
    src/ending-punctuation.spec.js on lines 1044..1053
    src/ending-punctuation.spec.js on lines 1373..1382
    src/ending-punctuation.spec.js on lines 1486..1495
    src/ending-punctuation.spec.js on lines 1790..1799
    src/ending-punctuation.spec.js on lines 2226..2235
    src/ending-punctuation.spec.js on lines 2407..2416
    src/ending-punctuation.spec.js on lines 2533..2542

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

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

          it('Repairs the invalid record - Add punc $i (last)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidMissingI);
            expect(recordInvalidMissingI.equalsTo(recordValid)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 220..229
    src/ending-punctuation.spec.js on lines 431..440
    src/ending-punctuation.spec.js on lines 611..620
    src/ending-punctuation.spec.js on lines 786..795
    src/ending-punctuation.spec.js on lines 1044..1053
    src/ending-punctuation.spec.js on lines 1210..1219
    src/ending-punctuation.spec.js on lines 1486..1495
    src/ending-punctuation.spec.js on lines 1790..1799
    src/ending-punctuation.spec.js on lines 2226..2235
    src/ending-punctuation.spec.js on lines 2407..2416
    src/ending-punctuation.spec.js on lines 2533..2542

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

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

          it('Repairs the invalid record - Remove punc $e (language field, strict)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid);
            expect(recordInvalid.equalsTo(recordValid)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 220..229
    src/ending-punctuation.spec.js on lines 431..440
    src/ending-punctuation.spec.js on lines 611..620
    src/ending-punctuation.spec.js on lines 786..795
    src/ending-punctuation.spec.js on lines 1044..1053
    src/ending-punctuation.spec.js on lines 1210..1219
    src/ending-punctuation.spec.js on lines 1373..1382
    src/ending-punctuation.spec.js on lines 1486..1495
    src/ending-punctuation.spec.js on lines 1790..1799
    src/ending-punctuation.spec.js on lines 2226..2235
    src/ending-punctuation.spec.js on lines 2533..2542

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

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

          it('Repairs the invalid record - 647 Fast, removes double punc $d', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid647FastEndPunc);
            expect(recordInvalid647FastEndPunc.equalsTo(recordValid647FastEndPunc)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 220..229
    src/ending-punctuation.spec.js on lines 431..440
    src/ending-punctuation.spec.js on lines 611..620
    src/ending-punctuation.spec.js on lines 786..795
    src/ending-punctuation.spec.js on lines 1044..1053
    src/ending-punctuation.spec.js on lines 1210..1219
    src/ending-punctuation.spec.js on lines 1373..1382
    src/ending-punctuation.spec.js on lines 1486..1495
    src/ending-punctuation.spec.js on lines 2226..2235
    src/ending-punctuation.spec.js on lines 2407..2416
    src/ending-punctuation.spec.js on lines 2533..2542

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        it('Repairs the invalid record', async () => {
          const validator = await validatorFactory();
          const result = await validator.fix(recordBroken);
          expect(recordBroken.equalsTo(recordValid)).to.eql(true);
          expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 1 other location - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 453..462

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

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

          it('Repairs the invalid record - Add punc $a', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidOnlyAMissingA);
            expect(recordInvalidOnlyAMissingA.equalsTo(recordValidOnlyA)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 220..229
    src/ending-punctuation.spec.js on lines 611..620
    src/ending-punctuation.spec.js on lines 786..795
    src/ending-punctuation.spec.js on lines 1044..1053
    src/ending-punctuation.spec.js on lines 1210..1219
    src/ending-punctuation.spec.js on lines 1373..1382
    src/ending-punctuation.spec.js on lines 1486..1495
    src/ending-punctuation.spec.js on lines 1790..1799
    src/ending-punctuation.spec.js on lines 2226..2235
    src/ending-punctuation.spec.js on lines 2407..2416
    src/ending-punctuation.spec.js on lines 2533..2542

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

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

          it('Repairs the invalid record - Add punc $c', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidEndC);
            expect(recordInvalidEndC.equalsTo(recordValidEndC)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 220..229
    src/ending-punctuation.spec.js on lines 431..440
    src/ending-punctuation.spec.js on lines 786..795
    src/ending-punctuation.spec.js on lines 1044..1053
    src/ending-punctuation.spec.js on lines 1210..1219
    src/ending-punctuation.spec.js on lines 1373..1382
    src/ending-punctuation.spec.js on lines 1486..1495
    src/ending-punctuation.spec.js on lines 1790..1799
    src/ending-punctuation.spec.js on lines 2226..2235
    src/ending-punctuation.spec.js on lines 2407..2416
    src/ending-punctuation.spec.js on lines 2533..2542

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

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

          it('Repairs the invalid record - Add punc $c', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidInd2v1);
            expect(recordInvalidInd2v1.equalsTo(recordValidInd2v1)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 220..229
    src/ending-punctuation.spec.js on lines 431..440
    src/ending-punctuation.spec.js on lines 611..620
    src/ending-punctuation.spec.js on lines 1044..1053
    src/ending-punctuation.spec.js on lines 1210..1219
    src/ending-punctuation.spec.js on lines 1373..1382
    src/ending-punctuation.spec.js on lines 1486..1495
    src/ending-punctuation.spec.js on lines 1790..1799
    src/ending-punctuation.spec.js on lines 2226..2235
    src/ending-punctuation.spec.js on lines 2407..2416
    src/ending-punctuation.spec.js on lines 2533..2542

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

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

          it('Repairs the invalid record - 655 Finnish, remove punc $a', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid655FinYes);
            expect(recordInvalid655FinYes.equalsTo(recordValid655FinNo)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 220..229
    src/ending-punctuation.spec.js on lines 431..440
    src/ending-punctuation.spec.js on lines 611..620
    src/ending-punctuation.spec.js on lines 786..795
    src/ending-punctuation.spec.js on lines 1044..1053
    src/ending-punctuation.spec.js on lines 1210..1219
    src/ending-punctuation.spec.js on lines 1373..1382
    src/ending-punctuation.spec.js on lines 1486..1495
    src/ending-punctuation.spec.js on lines 1790..1799
    src/ending-punctuation.spec.js on lines 2407..2416
    src/ending-punctuation.spec.js on lines 2533..2542

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

          it('Repairs the invalid record - Add punc $a & remove punc $y (Language field)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidOnlyAMissingAPuncY);
            expect(recordInvalidOnlyAMissingAPuncY.equalsTo(recordValidOnlyA)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 1 other location - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 117..126

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

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

          it('Repairs the invalid record - Add punc $a (last before $u)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidWithU);
            expect(recordInvalidWithU.equalsTo(recordValidWithU)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - 648 Fast, removes punc $a', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid648FastYes);
            expect(recordInvalid648FastYes.equalsTo(recordValid648FastNo)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - 655 Finnish, removes punc $a 2', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid655FinYes2);
            expect(recordInvalid655FinYes2.equalsTo(recordValid655FinNo2)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - Add punc $d (last of list)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidComplexDMissing);
            expect(recordInvalidComplexDMissing.equalsTo(recordInvalidComplexDMissing)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - 655 !Finnish, add punc $a (no control)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid655EngNoNoControl);
            expect(recordInvalid655EngNoNoControl.equalsTo(recordValid655EngYesNoControl)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - Add punc $d (last of two)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidDDMissing);
            expect(recordInvalidDDMissing.equalsTo(recordValidDD)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - Removes punc $a (register)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidOnlyA);
            expect(recordInvalidOnlyA.equalsTo(recordValidOnlyA)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - Remove punc $b (only data field)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidWithoutA);
            expect(recordInvalidWithoutA.equalsTo(recordValidWithoutA)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - Add punc $a', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordValidWithoutYMissingA);
            expect(recordValidWithoutYMissingA.equalsTo(recordValidWithoutY)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - Remove double punc $g', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidEndGDouble);
            expect(recordInvalidEndGDouble.equalsTo(recordValidEndG)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - Add punc $a (last)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidAMissingB);
            expect(recordInvalidAMissingB.equalsTo(recordValidAB)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - 650 Finnish, removes punc $x', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid650FinYes);
            expect(recordInvalid650FinYes.equalsTo(recordValid650FinNo)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - 650 !Finnish, add punc $v (no control)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid650EngNoControl);
            expect(recordInvalid650EngNoControl.equalsTo(recordValid650EngNoControl)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - 656 Finnish, remove punc $a', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid656FinYes);
            expect(recordInvalid656FinYes.equalsTo(recordValid656FinNo)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - 658 !Finnish, add punc $d', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid658EngNo);
            expect(recordInvalid658EngNo.equalsTo(recordValid658EngYes)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - Remove punc $y (Language field)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidOnlyAPuncY);
            expect(recordInvalidOnlyAPuncY.equalsTo(recordValidOnlyA)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - 650 !Finnish, add punc $a', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid650EngControl);
            expect(recordInvalid650EngControl.equalsTo(recordValid650EngControl)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - 655 !Finnish, add punc $y', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid655EngNo);
            expect(recordInvalid655EngNo.equalsTo(recordValid655EngYes)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - 657 !Finnish, add punc $z', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid657EngNo);
            expect(recordInvalid657EngNo.equalsTo(recordValid657EngYes)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - Add punc $a (only)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidOnlyA);
            expect(recordInvalidOnlyA.equalsTo(recordValidOnlyA)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - Remove punc $c ($c has ©, should not have punc)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidCopyrightCExtra);
            expect(recordInvalidCopyrightCExtra.equalsTo(recordValidCopyright)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - 662 !Finnish, add pun $a', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalid662EngNo);
            expect(recordInvalid662EngNo.equalsTo(recordValid662EngYes)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - Add punc $b (mandatory)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidABMissing);
            expect(recordInvalidABMissing.equalsTo(recordValidAB)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - Add punc $p', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordValidMultipleMissingP);
            expect(recordValidMultipleMissingP.equalsTo(recordValidMultiple)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - Add punc $a (only)', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidOnlyA);
            expect(recordInvalidOnlyA.equalsTo(recordValidOnlyA)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2544..2553

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

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

          it('Repairs the invalid record - Add punc $c', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvalidComplex);
            expect(recordInvalidComplex.equalsTo(recordValidComplex)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1801..1810
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427

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

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

          it('Repairs the invalid record - 648 Finnish, removes punc $a', async () => {
            const validator = await validatorFactory();
            const result = await validator.fix(recordInvali648dFinYes);
            expect(recordInvali648dFinYes.equalsTo(recordVali648dFinNo)).to.eql(true);
            expect(result).to.eql({
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 231..240
    src/ending-punctuation.spec.js on lines 442..451
    src/ending-punctuation.spec.js on lines 464..473
    src/ending-punctuation.spec.js on lines 475..484
    src/ending-punctuation.spec.js on lines 622..631
    src/ending-punctuation.spec.js on lines 797..806
    src/ending-punctuation.spec.js on lines 1055..1064
    src/ending-punctuation.spec.js on lines 1066..1075
    src/ending-punctuation.spec.js on lines 1077..1086
    src/ending-punctuation.spec.js on lines 1088..1097
    src/ending-punctuation.spec.js on lines 1221..1230
    src/ending-punctuation.spec.js on lines 1384..1393
    src/ending-punctuation.spec.js on lines 1497..1506
    src/ending-punctuation.spec.js on lines 1812..1821
    src/ending-punctuation.spec.js on lines 1823..1832
    src/ending-punctuation.spec.js on lines 1834..1843
    src/ending-punctuation.spec.js on lines 1845..1854
    src/ending-punctuation.spec.js on lines 2237..2246
    src/ending-punctuation.spec.js on lines 2248..2257
    src/ending-punctuation.spec.js on lines 2259..2268
    src/ending-punctuation.spec.js on lines 2270..2279
    src/ending-punctuation.spec.js on lines 2281..2290
    src/ending-punctuation.spec.js on lines 2292..2301
    src/ending-punctuation.spec.js on lines 2303..2312
    src/ending-punctuation.spec.js on lines 2418..2427
    src/ending-punctuation.spec.js on lines 2544..2553

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

          const recordValidComplex = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '880',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 1 other location - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 2497..2512

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

          const recordInvalidComplex = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '880',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 1 other location - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 2451..2466

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

          const recordValidMultiple = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '242',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 1 other location - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 355..370

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

          const recordValidMultipleMissingP = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '242',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 1 other location - About 3 hrs to fix
    src/ending-punctuation.spec.js on lines 261..276

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

          const recordInvalidEndGDouble = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '260',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 3 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 507..522
    src/ending-punctuation.spec.js on lines 1935..1950
    src/ending-punctuation.spec.js on lines 2105..2120

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

          const recordInvalid657EngNo = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '657',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 3 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 507..522
    src/ending-punctuation.spec.js on lines 575..590
    src/ending-punctuation.spec.js on lines 1935..1950

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

          const recordValidEndG = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '260',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 3 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 575..590
    src/ending-punctuation.spec.js on lines 1935..1950
    src/ending-punctuation.spec.js on lines 2105..2120

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

          const recordValid657EngYes = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '657',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 3 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 507..522
    src/ending-punctuation.spec.js on lines 575..590
    src/ending-punctuation.spec.js on lines 2105..2120

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

          const recordValidSimple = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '880',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 1 other location - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 2481..2495

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

          const recordInvalidSimple = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '880',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 1 other location - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 2435..2449

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

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

          const recordValidEndC = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '260',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 7 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 559..573
    src/ending-punctuation.spec.js on lines 648..662
    src/ending-punctuation.spec.js on lines 1301..1315
    src/ending-punctuation.spec.js on lines 1514..1528
    src/ending-punctuation.spec.js on lines 1643..1657
    src/ending-punctuation.spec.js on lines 2319..2333
    src/ending-punctuation.spec.js on lines 2360..2374

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

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

          const recordValid = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '760',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 7 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 491..505
    src/ending-punctuation.spec.js on lines 559..573
    src/ending-punctuation.spec.js on lines 648..662
    src/ending-punctuation.spec.js on lines 1301..1315
    src/ending-punctuation.spec.js on lines 1514..1528
    src/ending-punctuation.spec.js on lines 1643..1657
    src/ending-punctuation.spec.js on lines 2360..2374

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

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

          const recordInvalid = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '760',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 7 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 491..505
    src/ending-punctuation.spec.js on lines 559..573
    src/ending-punctuation.spec.js on lines 648..662
    src/ending-punctuation.spec.js on lines 1301..1315
    src/ending-punctuation.spec.js on lines 1514..1528
    src/ending-punctuation.spec.js on lines 1643..1657
    src/ending-punctuation.spec.js on lines 2319..2333

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

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

          const recordInvalid647FastEndPunc = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '647',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 7 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 491..505
    src/ending-punctuation.spec.js on lines 559..573
    src/ending-punctuation.spec.js on lines 648..662
    src/ending-punctuation.spec.js on lines 1301..1315
    src/ending-punctuation.spec.js on lines 1514..1528
    src/ending-punctuation.spec.js on lines 2319..2333
    src/ending-punctuation.spec.js on lines 2360..2374

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

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

          const recordInvalidMissingI = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '538',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 7 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 491..505
    src/ending-punctuation.spec.js on lines 559..573
    src/ending-punctuation.spec.js on lines 648..662
    src/ending-punctuation.spec.js on lines 1514..1528
    src/ending-punctuation.spec.js on lines 1643..1657
    src/ending-punctuation.spec.js on lines 2319..2333
    src/ending-punctuation.spec.js on lines 2360..2374

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

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

          const recordInvalidEndC = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '260',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 7 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 491..505
    src/ending-punctuation.spec.js on lines 648..662
    src/ending-punctuation.spec.js on lines 1301..1315
    src/ending-punctuation.spec.js on lines 1514..1528
    src/ending-punctuation.spec.js on lines 1643..1657
    src/ending-punctuation.spec.js on lines 2319..2333
    src/ending-punctuation.spec.js on lines 2360..2374

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

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

          const recordValidInd2v1 = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '264',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 7 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 491..505
    src/ending-punctuation.spec.js on lines 559..573
    src/ending-punctuation.spec.js on lines 1301..1315
    src/ending-punctuation.spec.js on lines 1514..1528
    src/ending-punctuation.spec.js on lines 1643..1657
    src/ending-punctuation.spec.js on lines 2319..2333
    src/ending-punctuation.spec.js on lines 2360..2374

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

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

          const recordValid647FastEndPunc = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '647',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 7 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 491..505
    src/ending-punctuation.spec.js on lines 559..573
    src/ending-punctuation.spec.js on lines 648..662
    src/ending-punctuation.spec.js on lines 1301..1315
    src/ending-punctuation.spec.js on lines 1643..1657
    src/ending-punctuation.spec.js on lines 2319..2333
    src/ending-punctuation.spec.js on lines 2360..2374

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

          const recordValid = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '538',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 1 other location - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 1317..1331

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

          const recordInvalidI = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '538',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 1 other location - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 1238..1252

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

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

          const recordValidInd2v1Short = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '264',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 524..538
    src/ending-punctuation.spec.js on lines 695..709
    src/ending-punctuation.spec.js on lines 735..749
    src/ending-punctuation.spec.js on lines 751..765
    src/ending-punctuation.spec.js on lines 1254..1268
    src/ending-punctuation.spec.js on lines 1560..1574
    src/ending-punctuation.spec.js on lines 1689..1703
    src/ending-punctuation.spec.js on lines 1892..1906
    src/ending-punctuation.spec.js on lines 1952..1966
    src/ending-punctuation.spec.js on lines 2062..2076
    src/ending-punctuation.spec.js on lines 2122..2136

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

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

          const recordValid658EngYes = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '658',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 524..538
    src/ending-punctuation.spec.js on lines 664..678
    src/ending-punctuation.spec.js on lines 695..709
    src/ending-punctuation.spec.js on lines 735..749
    src/ending-punctuation.spec.js on lines 751..765
    src/ending-punctuation.spec.js on lines 1254..1268
    src/ending-punctuation.spec.js on lines 1560..1574
    src/ending-punctuation.spec.js on lines 1689..1703
    src/ending-punctuation.spec.js on lines 1892..1906
    src/ending-punctuation.spec.js on lines 2062..2076
    src/ending-punctuation.spec.js on lines 2122..2136

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

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

          const recordInvalidInd2v1 = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '264',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 524..538
    src/ending-punctuation.spec.js on lines 664..678
    src/ending-punctuation.spec.js on lines 695..709
    src/ending-punctuation.spec.js on lines 751..765
    src/ending-punctuation.spec.js on lines 1254..1268
    src/ending-punctuation.spec.js on lines 1560..1574
    src/ending-punctuation.spec.js on lines 1689..1703
    src/ending-punctuation.spec.js on lines 1892..1906
    src/ending-punctuation.spec.js on lines 1952..1966
    src/ending-punctuation.spec.js on lines 2062..2076
    src/ending-punctuation.spec.js on lines 2122..2136

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

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

          const recordValid655EngYes = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '655',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 524..538
    src/ending-punctuation.spec.js on lines 664..678
    src/ending-punctuation.spec.js on lines 695..709
    src/ending-punctuation.spec.js on lines 735..749
    src/ending-punctuation.spec.js on lines 751..765
    src/ending-punctuation.spec.js on lines 1254..1268
    src/ending-punctuation.spec.js on lines 1560..1574
    src/ending-punctuation.spec.js on lines 1689..1703
    src/ending-punctuation.spec.js on lines 1952..1966
    src/ending-punctuation.spec.js on lines 2062..2076
    src/ending-punctuation.spec.js on lines 2122..2136

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

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

          const recordValid650FinNo = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '650',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 524..538
    src/ending-punctuation.spec.js on lines 664..678
    src/ending-punctuation.spec.js on lines 695..709
    src/ending-punctuation.spec.js on lines 735..749
    src/ending-punctuation.spec.js on lines 751..765
    src/ending-punctuation.spec.js on lines 1254..1268
    src/ending-punctuation.spec.js on lines 1689..1703
    src/ending-punctuation.spec.js on lines 1892..1906
    src/ending-punctuation.spec.js on lines 1952..1966
    src/ending-punctuation.spec.js on lines 2062..2076
    src/ending-punctuation.spec.js on lines 2122..2136

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

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

          const recordInvalid650FinYes = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '650',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 524..538
    src/ending-punctuation.spec.js on lines 664..678
    src/ending-punctuation.spec.js on lines 695..709
    src/ending-punctuation.spec.js on lines 735..749
    src/ending-punctuation.spec.js on lines 751..765
    src/ending-punctuation.spec.js on lines 1254..1268
    src/ending-punctuation.spec.js on lines 1560..1574
    src/ending-punctuation.spec.js on lines 1892..1906
    src/ending-punctuation.spec.js on lines 1952..1966
    src/ending-punctuation.spec.js on lines 2062..2076
    src/ending-punctuation.spec.js on lines 2122..2136

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

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

          const recordValidPuncU = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '538',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 524..538
    src/ending-punctuation.spec.js on lines 664..678
    src/ending-punctuation.spec.js on lines 695..709
    src/ending-punctuation.spec.js on lines 735..749
    src/ending-punctuation.spec.js on lines 751..765
    src/ending-punctuation.spec.js on lines 1560..1574
    src/ending-punctuation.spec.js on lines 1689..1703
    src/ending-punctuation.spec.js on lines 1892..1906
    src/ending-punctuation.spec.js on lines 1952..1966
    src/ending-punctuation.spec.js on lines 2062..2076
    src/ending-punctuation.spec.js on lines 2122..2136

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

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

          const recordInvalid655EngNo = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '655',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 524..538
    src/ending-punctuation.spec.js on lines 664..678
    src/ending-punctuation.spec.js on lines 695..709
    src/ending-punctuation.spec.js on lines 735..749
    src/ending-punctuation.spec.js on lines 751..765
    src/ending-punctuation.spec.js on lines 1254..1268
    src/ending-punctuation.spec.js on lines 1560..1574
    src/ending-punctuation.spec.js on lines 1689..1703
    src/ending-punctuation.spec.js on lines 1892..1906
    src/ending-punctuation.spec.js on lines 1952..1966
    src/ending-punctuation.spec.js on lines 2122..2136

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

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

          const recordValidEndB = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '260',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 664..678
    src/ending-punctuation.spec.js on lines 695..709
    src/ending-punctuation.spec.js on lines 735..749
    src/ending-punctuation.spec.js on lines 751..765
    src/ending-punctuation.spec.js on lines 1254..1268
    src/ending-punctuation.spec.js on lines 1560..1574
    src/ending-punctuation.spec.js on lines 1689..1703
    src/ending-punctuation.spec.js on lines 1892..1906
    src/ending-punctuation.spec.js on lines 1952..1966
    src/ending-punctuation.spec.js on lines 2062..2076
    src/ending-punctuation.spec.js on lines 2122..2136

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

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

          const recordValidCopyright = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '264',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 524..538
    src/ending-punctuation.spec.js on lines 664..678
    src/ending-punctuation.spec.js on lines 735..749
    src/ending-punctuation.spec.js on lines 751..765
    src/ending-punctuation.spec.js on lines 1254..1268
    src/ending-punctuation.spec.js on lines 1560..1574
    src/ending-punctuation.spec.js on lines 1689..1703
    src/ending-punctuation.spec.js on lines 1892..1906
    src/ending-punctuation.spec.js on lines 1952..1966
    src/ending-punctuation.spec.js on lines 2062..2076
    src/ending-punctuation.spec.js on lines 2122..2136

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

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

          const recordInvalid658EngNo = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '658',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 524..538
    src/ending-punctuation.spec.js on lines 664..678
    src/ending-punctuation.spec.js on lines 695..709
    src/ending-punctuation.spec.js on lines 735..749
    src/ending-punctuation.spec.js on lines 751..765
    src/ending-punctuation.spec.js on lines 1254..1268
    src/ending-punctuation.spec.js on lines 1560..1574
    src/ending-punctuation.spec.js on lines 1689..1703
    src/ending-punctuation.spec.js on lines 1892..1906
    src/ending-punctuation.spec.js on lines 1952..1966
    src/ending-punctuation.spec.js on lines 2062..2076

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

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

          const recordInvalidCopyrightCExtra = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '264',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 524..538
    src/ending-punctuation.spec.js on lines 664..678
    src/ending-punctuation.spec.js on lines 695..709
    src/ending-punctuation.spec.js on lines 735..749
    src/ending-punctuation.spec.js on lines 1254..1268
    src/ending-punctuation.spec.js on lines 1560..1574
    src/ending-punctuation.spec.js on lines 1689..1703
    src/ending-punctuation.spec.js on lines 1892..1906
    src/ending-punctuation.spec.js on lines 1952..1966
    src/ending-punctuation.spec.js on lines 2062..2076
    src/ending-punctuation.spec.js on lines 2122..2136

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

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

          it('Finds record invalid - Ind2 = 4, copyright, extra punc $c', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidCopyrightCExtra);
            expect(result).to.eql({
              message: ['Field 264 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 210..217
    src/ending-punctuation.spec.js on lines 421..428
    src/ending-punctuation.spec.js on lines 601..608
    src/ending-punctuation.spec.js on lines 1034..1041
    src/ending-punctuation.spec.js on lines 1200..1207
    src/ending-punctuation.spec.js on lines 1363..1370
    src/ending-punctuation.spec.js on lines 1476..1483
    src/ending-punctuation.spec.js on lines 1780..1787
    src/ending-punctuation.spec.js on lines 2216..2223
    src/ending-punctuation.spec.js on lines 2397..2404
    src/ending-punctuation.spec.js on lines 2523..2530

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

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

          it('Finds record invalid - No punc $a (only)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidOnlyA);
            expect(result).to.eql({
              message: ['Field 538 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 210..217
    src/ending-punctuation.spec.js on lines 421..428
    src/ending-punctuation.spec.js on lines 601..608
    src/ending-punctuation.spec.js on lines 776..783
    src/ending-punctuation.spec.js on lines 1034..1041
    src/ending-punctuation.spec.js on lines 1200..1207
    src/ending-punctuation.spec.js on lines 1476..1483
    src/ending-punctuation.spec.js on lines 1780..1787
    src/ending-punctuation.spec.js on lines 2216..2223
    src/ending-punctuation.spec.js on lines 2397..2404
    src/ending-punctuation.spec.js on lines 2523..2530

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

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

          it('Finds record invalid - No punc $a (only)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidOnlyA);
            expect(result).to.eql({
              message: ['Field 760 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 210..217
    src/ending-punctuation.spec.js on lines 421..428
    src/ending-punctuation.spec.js on lines 601..608
    src/ending-punctuation.spec.js on lines 776..783
    src/ending-punctuation.spec.js on lines 1034..1041
    src/ending-punctuation.spec.js on lines 1200..1207
    src/ending-punctuation.spec.js on lines 1363..1370
    src/ending-punctuation.spec.js on lines 1476..1483
    src/ending-punctuation.spec.js on lines 1780..1787
    src/ending-punctuation.spec.js on lines 2216..2223
    src/ending-punctuation.spec.js on lines 2523..2530

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

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

          it('Finds record invalid', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidEndGDouble);
            expect(result).to.eql({
              message: ['Field 260 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 210..217
    src/ending-punctuation.spec.js on lines 421..428
    src/ending-punctuation.spec.js on lines 776..783
    src/ending-punctuation.spec.js on lines 1034..1041
    src/ending-punctuation.spec.js on lines 1200..1207
    src/ending-punctuation.spec.js on lines 1363..1370
    src/ending-punctuation.spec.js on lines 1476..1483
    src/ending-punctuation.spec.js on lines 1780..1787
    src/ending-punctuation.spec.js on lines 2216..2223
    src/ending-punctuation.spec.js on lines 2397..2404
    src/ending-punctuation.spec.js on lines 2523..2530

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

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

          it('Finds record invalid - No punc $a (with $u)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidWithU);
            expect(result).to.eql({
              message: ['Field 520 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 210..217
    src/ending-punctuation.spec.js on lines 421..428
    src/ending-punctuation.spec.js on lines 601..608
    src/ending-punctuation.spec.js on lines 776..783
    src/ending-punctuation.spec.js on lines 1034..1041
    src/ending-punctuation.spec.js on lines 1363..1370
    src/ending-punctuation.spec.js on lines 1476..1483
    src/ending-punctuation.spec.js on lines 1780..1787
    src/ending-punctuation.spec.js on lines 2216..2223
    src/ending-punctuation.spec.js on lines 2397..2404
    src/ending-punctuation.spec.js on lines 2523..2530

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

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

          it('Finds record invalid - 662 !Finnish, without punc $a', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid662EngNo);
            expect(result).to.eql({
              message: ['Field 662 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 210..217
    src/ending-punctuation.spec.js on lines 421..428
    src/ending-punctuation.spec.js on lines 601..608
    src/ending-punctuation.spec.js on lines 776..783
    src/ending-punctuation.spec.js on lines 1034..1041
    src/ending-punctuation.spec.js on lines 1200..1207
    src/ending-punctuation.spec.js on lines 1363..1370
    src/ending-punctuation.spec.js on lines 1476..1483
    src/ending-punctuation.spec.js on lines 1780..1787
    src/ending-punctuation.spec.js on lines 2397..2404
    src/ending-punctuation.spec.js on lines 2523..2530

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

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

          it('Finds record invalid - No punc $c', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidComplex);
            expect(result).to.eql({
              message: ['Field 880 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 210..217
    src/ending-punctuation.spec.js on lines 421..428
    src/ending-punctuation.spec.js on lines 601..608
    src/ending-punctuation.spec.js on lines 776..783
    src/ending-punctuation.spec.js on lines 1034..1041
    src/ending-punctuation.spec.js on lines 1200..1207
    src/ending-punctuation.spec.js on lines 1363..1370
    src/ending-punctuation.spec.js on lines 1476..1483
    src/ending-punctuation.spec.js on lines 1780..1787
    src/ending-punctuation.spec.js on lines 2216..2223
    src/ending-punctuation.spec.js on lines 2397..2404

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

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

          it('Finds record invalid - 650 !Finnish, without punc', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid650EngControl);
            expect(result).to.eql({
              message: ['Field 650 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 210..217
    src/ending-punctuation.spec.js on lines 421..428
    src/ending-punctuation.spec.js on lines 601..608
    src/ending-punctuation.spec.js on lines 776..783
    src/ending-punctuation.spec.js on lines 1034..1041
    src/ending-punctuation.spec.js on lines 1200..1207
    src/ending-punctuation.spec.js on lines 1363..1370
    src/ending-punctuation.spec.js on lines 1476..1483
    src/ending-punctuation.spec.js on lines 2216..2223
    src/ending-punctuation.spec.js on lines 2397..2404
    src/ending-punctuation.spec.js on lines 2523..2530

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

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

          it('Finds record invalid - No punc $a (only)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidWithoutYMissingA);
            expect(result).to.eql({
              message: ['Field 242 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 210..217
    src/ending-punctuation.spec.js on lines 601..608
    src/ending-punctuation.spec.js on lines 776..783
    src/ending-punctuation.spec.js on lines 1034..1041
    src/ending-punctuation.spec.js on lines 1200..1207
    src/ending-punctuation.spec.js on lines 1363..1370
    src/ending-punctuation.spec.js on lines 1476..1483
    src/ending-punctuation.spec.js on lines 1780..1787
    src/ending-punctuation.spec.js on lines 2216..2223
    src/ending-punctuation.spec.js on lines 2397..2404
    src/ending-punctuation.spec.js on lines 2523..2530

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

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

          it('Finds record invalid - No punc $d (last of two) followed by $g', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidComplexDMissing);
            expect(result).to.eql({
              message: ['Field 340 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 210..217
    src/ending-punctuation.spec.js on lines 421..428
    src/ending-punctuation.spec.js on lines 601..608
    src/ending-punctuation.spec.js on lines 776..783
    src/ending-punctuation.spec.js on lines 1200..1207
    src/ending-punctuation.spec.js on lines 1363..1370
    src/ending-punctuation.spec.js on lines 1476..1483
    src/ending-punctuation.spec.js on lines 1780..1787
    src/ending-punctuation.spec.js on lines 2216..2223
    src/ending-punctuation.spec.js on lines 2397..2404
    src/ending-punctuation.spec.js on lines 2523..2530

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

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

          it('Finds record invalid - Only $a with punc', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidOnlyA);
            expect(result).to.eql({
              message: ['Field 036 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 421..428
    src/ending-punctuation.spec.js on lines 601..608
    src/ending-punctuation.spec.js on lines 776..783
    src/ending-punctuation.spec.js on lines 1034..1041
    src/ending-punctuation.spec.js on lines 1200..1207
    src/ending-punctuation.spec.js on lines 1363..1370
    src/ending-punctuation.spec.js on lines 1476..1483
    src/ending-punctuation.spec.js on lines 1780..1787
    src/ending-punctuation.spec.js on lines 2216..2223
    src/ending-punctuation.spec.js on lines 2397..2404
    src/ending-punctuation.spec.js on lines 2523..2530

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

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

          it('Finds record invalid - Punc $b (only data field)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidWithoutA);
            expect(result).to.eql({
              message: ['Field 567 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 11 other locations - About 2 hrs to fix
    src/ending-punctuation.spec.js on lines 210..217
    src/ending-punctuation.spec.js on lines 421..428
    src/ending-punctuation.spec.js on lines 601..608
    src/ending-punctuation.spec.js on lines 776..783
    src/ending-punctuation.spec.js on lines 1034..1041
    src/ending-punctuation.spec.js on lines 1200..1207
    src/ending-punctuation.spec.js on lines 1363..1370
    src/ending-punctuation.spec.js on lines 1780..1787
    src/ending-punctuation.spec.js on lines 2216..2223
    src/ending-punctuation.spec.js on lines 2397..2404
    src/ending-punctuation.spec.js on lines 2523..2530

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

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

          it('Finds record invalid - No punc $p (last before $y)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidMultipleMissingP);
            expect(result).to.eql({
              message: ['Field 242 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - Invalid punc $i (":" not valid punc mark, but this is according example...)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidI);
            expect(result).to.eql({
              message: ['Field 538 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - 650 !Finnish, without punc (no control)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid650EngNoControl);
            expect(result).to.eql({
              message: ['Field 650 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - No punc at $a (only before $y)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidOnlyAMissingA);
            expect(result).to.eql({
              message: ['Field 242 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - No punc $i (last before $u)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidMissingI);
            expect(result).to.eql({
              message: ['Field 538 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - No punc $b', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid);
            expect(result).to.eql({
              message: ['Field 036 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - No punc $b (mandatory)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidABMissing);
            expect(result).to.eql({
              message: ['Field 340 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - No punc $d (last of two)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidDDMissing);
            expect(result).to.eql({
              message: ['Field 340 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - 650 Finnish, with punc', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid650FinYes);
            expect(result).to.eql({
              message: ['Field 650 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - No punc $a (only)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid);
            expect(result).to.eql({
              message: ['Field 567 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - 655 Finnish, punc $a', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid655FinYes);
            expect(result).to.eql({
              message: ['Field 655 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidEndC);
            expect(result).to.eql({
              message: ['Field 260 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - No punc $a (only)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidA);
            expect(result).to.eql({
              message: ['Field 340 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - 648 Finnish, with punc', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvali648dFinYes);
            expect(result).to.eql({
              message: ['Field 648 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - No punc $a (last)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidAMissingB);
            expect(result).to.eql({
              message: ['Field 340 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - No punc $a (without $u)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid);
            expect(result).to.eql({
              message: ['Field 520 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - 648 Fast, with punc', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid648FastYes);
            expect(result).to.eql({
              message: ['Field 648 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - 647 Fast, dot at end', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid647FastEndPunc);
            expect(result).to.eql({
              message: ['Field 647 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - No punc $b', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidSimple);
            expect(result).to.eql({
              message: ['Field 880 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395

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

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

          it('Finds record invalid - No punc $c', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalidInd2v1);
            expect(result).to.eql({
              message: ['Field 264 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - 655 !Finnish, without punc $a (no control)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid655EngNoNoControl);
            expect(result).to.eql({
              message: ['Field 655 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - 658 !Finnish, without punc $d', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid658EngNo);
            expect(result).to.eql({
              message: ['Field 658 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - 655 Finnish, with punc', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid655FinYes2);
            expect(result).to.eql({
              message: ['Field 655 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - 655 !Finnish, without punc $y', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid655EngNo);
            expect(result).to.eql({
              message: ['Field 655 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - 657 !Finnish, without punc $z', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid657EngNo);
            expect(result).to.eql({
              message: ['Field 657 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

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

          it('Finds record invalid - Punc $e (language field, strict)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid);
            expect(result).to.eql({
              message: ['Field 760 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2189..2196
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2514..2521

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

    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 recordInvalidOnlyAMissingAPuncY = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '242',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 2 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 325..338
    src/ending-punctuation.spec.js on lines 1545..1558

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

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

          it('Finds record invalid - 656 Finnish, with punc $a', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordInvalid656FinYes);
            expect(result).to.eql({
              message: ['Field 656 has invalid ending punctuation'],
    Severity: Major
    Found in src/ending-punctuation.spec.js and 26 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 201..208
    src/ending-punctuation.spec.js on lines 385..392
    src/ending-punctuation.spec.js on lines 412..419
    src/ending-punctuation.spec.js on lines 592..599
    src/ending-punctuation.spec.js on lines 767..774
    src/ending-punctuation.spec.js on lines 998..1005
    src/ending-punctuation.spec.js on lines 1007..1014
    src/ending-punctuation.spec.js on lines 1016..1023
    src/ending-punctuation.spec.js on lines 1025..1032
    src/ending-punctuation.spec.js on lines 1191..1198
    src/ending-punctuation.spec.js on lines 1345..1352
    src/ending-punctuation.spec.js on lines 1354..1361
    src/ending-punctuation.spec.js on lines 1467..1474
    src/ending-punctuation.spec.js on lines 1735..1742
    src/ending-punctuation.spec.js on lines 1744..1751
    src/ending-punctuation.spec.js on lines 1753..1760
    src/ending-punctuation.spec.js on lines 1762..1769
    src/ending-punctuation.spec.js on lines 1771..1778
    src/ending-punctuation.spec.js on lines 2153..2160
    src/ending-punctuation.spec.js on lines 2162..2169
    src/ending-punctuation.spec.js on lines 2171..2178
    src/ending-punctuation.spec.js on lines 2180..2187
    src/ending-punctuation.spec.js on lines 2198..2205
    src/ending-punctuation.spec.js on lines 2207..2214
    src/ending-punctuation.spec.js on lines 2388..2395
    src/ending-punctuation.spec.js on lines 2514..2521

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

    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 recordValid648FastNo = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '648',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 2 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 325..338
    src/ending-punctuation.spec.js on lines 340..353

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

    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 recordInvalidOnlyAPuncY = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '242',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 2 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 340..353
    src/ending-punctuation.spec.js on lines 1545..1558

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

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

          const recordInvalidOnlyAMissingA = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '242',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 5 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 134..147
    src/ending-punctuation.spec.js on lines 174..187
    src/ending-punctuation.spec.js on lines 246..259
    src/ending-punctuation.spec.js on lines 1862..1875
    src/ending-punctuation.spec.js on lines 2032..2045

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

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

          const recordValidOnlyA = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '242',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 5 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 134..147
    src/ending-punctuation.spec.js on lines 174..187
    src/ending-punctuation.spec.js on lines 310..323
    src/ending-punctuation.spec.js on lines 1862..1875
    src/ending-punctuation.spec.js on lines 2032..2045

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

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

          const recordValid = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '036',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 5 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 174..187
    src/ending-punctuation.spec.js on lines 246..259
    src/ending-punctuation.spec.js on lines 310..323
    src/ending-punctuation.spec.js on lines 1862..1875
    src/ending-punctuation.spec.js on lines 2032..2045

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

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

          const recordValidAB = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '340',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 4 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 934..947
    src/ending-punctuation.spec.js on lines 949..962
    src/ending-punctuation.spec.js on lines 1115..1128
    src/ending-punctuation.spec.js on lines 1130..1143

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

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

          const recordInvalid = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '036',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 5 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 134..147
    src/ending-punctuation.spec.js on lines 246..259
    src/ending-punctuation.spec.js on lines 310..323
    src/ending-punctuation.spec.js on lines 1862..1875
    src/ending-punctuation.spec.js on lines 2032..2045

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

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

          const recordValidU = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '520',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 4 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 827..840
    src/ending-punctuation.spec.js on lines 934..947
    src/ending-punctuation.spec.js on lines 949..962
    src/ending-punctuation.spec.js on lines 1115..1128

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

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

          const recordInvalidAMissingB = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '340',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 4 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 827..840
    src/ending-punctuation.spec.js on lines 949..962
    src/ending-punctuation.spec.js on lines 1115..1128
    src/ending-punctuation.spec.js on lines 1130..1143

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

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

          const recordValidWithU = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '520',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 4 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 827..840
    src/ending-punctuation.spec.js on lines 934..947
    src/ending-punctuation.spec.js on lines 949..962
    src/ending-punctuation.spec.js on lines 1130..1143

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

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

          const recordInvalidABMissing = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '340',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 4 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 827..840
    src/ending-punctuation.spec.js on lines 934..947
    src/ending-punctuation.spec.js on lines 1115..1128
    src/ending-punctuation.spec.js on lines 1130..1143

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

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

          const recordInvalid655FinYes = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '655',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 5 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 134..147
    src/ending-punctuation.spec.js on lines 174..187
    src/ending-punctuation.spec.js on lines 246..259
    src/ending-punctuation.spec.js on lines 310..323
    src/ending-punctuation.spec.js on lines 1862..1875

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

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

          const recordValid655FinNo = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '655',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 5 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 134..147
    src/ending-punctuation.spec.js on lines 174..187
    src/ending-punctuation.spec.js on lines 246..259
    src/ending-punctuation.spec.js on lines 310..323
    src/ending-punctuation.spec.js on lines 2032..2045

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

    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 recordInvalid648FastYes = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '648',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 768..781

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

          const recordValidWithoutA = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '567',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 768..781

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

          const recordValid650EngControl = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '650',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 768..781

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

          const recordInvalid650EngControl = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '650',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 768..781

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

          const recordValid655FinNo2 = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '655',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 768..781

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

          const recordInvalid656FinYes = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '656',
    Severity: Major
    Found in src/ending-punctuation.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 2138..2151
    src/field-exclusion.spec.js on lines 768..781

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

          const recordInvali648dFinYes = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '648',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 768..781

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

          const recordValid662EngYes = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '662',
    Severity: Major
    Found in src/ending-punctuation.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 2047..2060
    src/ending-punctuation.spec.js on lines 2090..2103
    src/ending-punctuation.spec.js on lines 2138..2151
    src/field-exclusion.spec.js on lines 768..781

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

          const recordInvalidWithU = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '520',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 768..781

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

          const recordInvalid655FinYes2 = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '655',
    Severity: Major
    Found in src/ending-punctuation.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 2090..2103
    src/ending-punctuation.spec.js on lines 2138..2151
    src/field-exclusion.spec.js on lines 768..781

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

          const recordInvalidWithoutA = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '567',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 768..781

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

          const recordInvalid650EngNoControl = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '650',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 768..781

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

          const recordInvalid662EngNo = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '662',
    Severity: Major
    Found in src/ending-punctuation.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/field-exclusion.spec.js on lines 768..781

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

          const recordValid650EngNoControl = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '650',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 768..781

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

          const recordValid656FinNo = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '656',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 768..781

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

          const recordValidInd2v2WithoutC = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '264',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 20 other locations - About 1 hr to fix
    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
    src/field-exclusion.spec.js on lines 768..781

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

          const recordValidDD = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '340',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 768..781

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

          const recordValidJ2 = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '340',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 768..781

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

          const recordInvalidDDMissing = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '340',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 768..781

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

          const recordVali648dFinNo = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '648',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 768..781

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

          it('Finds record valid - Punc $a & $u (punc at $u should be ignored) ', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidU);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 10 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 167..171
    src/ending-punctuation.spec.js on lines 303..307
    src/ending-punctuation.spec.js on lines 552..556
    src/ending-punctuation.spec.js on lines 915..919
    src/ending-punctuation.spec.js on lines 1294..1298
    src/ending-punctuation.spec.js on lines 1433..1437
    src/ending-punctuation.spec.js on lines 1636..1640
    src/ending-punctuation.spec.js on lines 2025..2029
    src/ending-punctuation.spec.js on lines 2353..2357
    src/ending-punctuation.spec.js on lines 2474..2478

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

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

          it('Finds record valid - Punc $c', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidComplex);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 10 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 167..171
    src/ending-punctuation.spec.js on lines 303..307
    src/ending-punctuation.spec.js on lines 552..556
    src/ending-punctuation.spec.js on lines 915..919
    src/ending-punctuation.spec.js on lines 1157..1161
    src/ending-punctuation.spec.js on lines 1294..1298
    src/ending-punctuation.spec.js on lines 1433..1437
    src/ending-punctuation.spec.js on lines 1636..1640
    src/ending-punctuation.spec.js on lines 2025..2029
    src/ending-punctuation.spec.js on lines 2353..2357

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

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

          it('Finds record valid - Punc $a without $y', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidWithoutY);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 10 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 167..171
    src/ending-punctuation.spec.js on lines 552..556
    src/ending-punctuation.spec.js on lines 915..919
    src/ending-punctuation.spec.js on lines 1157..1161
    src/ending-punctuation.spec.js on lines 1294..1298
    src/ending-punctuation.spec.js on lines 1433..1437
    src/ending-punctuation.spec.js on lines 1636..1640
    src/ending-punctuation.spec.js on lines 2025..2029
    src/ending-punctuation.spec.js on lines 2353..2357
    src/ending-punctuation.spec.js on lines 2474..2478

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

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

          it('Finds record valid - No punc $b', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidEndB);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 10 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 167..171
    src/ending-punctuation.spec.js on lines 303..307
    src/ending-punctuation.spec.js on lines 915..919
    src/ending-punctuation.spec.js on lines 1157..1161
    src/ending-punctuation.spec.js on lines 1294..1298
    src/ending-punctuation.spec.js on lines 1433..1437
    src/ending-punctuation.spec.js on lines 1636..1640
    src/ending-punctuation.spec.js on lines 2025..2029
    src/ending-punctuation.spec.js on lines 2353..2357
    src/ending-punctuation.spec.js on lines 2474..2478

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

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

          it('Finds record valid - No punc (not $b, nor from list)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidJ2);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 10 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 167..171
    src/ending-punctuation.spec.js on lines 303..307
    src/ending-punctuation.spec.js on lines 552..556
    src/ending-punctuation.spec.js on lines 1157..1161
    src/ending-punctuation.spec.js on lines 1294..1298
    src/ending-punctuation.spec.js on lines 1433..1437
    src/ending-punctuation.spec.js on lines 1636..1640
    src/ending-punctuation.spec.js on lines 2025..2029
    src/ending-punctuation.spec.js on lines 2353..2357
    src/ending-punctuation.spec.js on lines 2474..2478

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

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

          it('Finds record valid - 650 English, with punc', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid650EngControl);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 10 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 167..171
    src/ending-punctuation.spec.js on lines 303..307
    src/ending-punctuation.spec.js on lines 552..556
    src/ending-punctuation.spec.js on lines 915..919
    src/ending-punctuation.spec.js on lines 1157..1161
    src/ending-punctuation.spec.js on lines 1294..1298
    src/ending-punctuation.spec.js on lines 1433..1437
    src/ending-punctuation.spec.js on lines 2025..2029
    src/ending-punctuation.spec.js on lines 2353..2357
    src/ending-punctuation.spec.js on lines 2474..2478

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

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

          it('Finds record valid - Only $a without punc', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidOnlyA);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 10 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 303..307
    src/ending-punctuation.spec.js on lines 552..556
    src/ending-punctuation.spec.js on lines 915..919
    src/ending-punctuation.spec.js on lines 1157..1161
    src/ending-punctuation.spec.js on lines 1294..1298
    src/ending-punctuation.spec.js on lines 1433..1437
    src/ending-punctuation.spec.js on lines 1636..1640
    src/ending-punctuation.spec.js on lines 2025..2029
    src/ending-punctuation.spec.js on lines 2353..2357
    src/ending-punctuation.spec.js on lines 2474..2478

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

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

          it('Finds record valid - No punc $b (only data field)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidWithoutA);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 10 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 167..171
    src/ending-punctuation.spec.js on lines 303..307
    src/ending-punctuation.spec.js on lines 552..556
    src/ending-punctuation.spec.js on lines 915..919
    src/ending-punctuation.spec.js on lines 1157..1161
    src/ending-punctuation.spec.js on lines 1294..1298
    src/ending-punctuation.spec.js on lines 1636..1640
    src/ending-punctuation.spec.js on lines 2025..2029
    src/ending-punctuation.spec.js on lines 2353..2357
    src/ending-punctuation.spec.js on lines 2474..2478

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

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

          it('Finds record valid - Punc $a (only)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidOnlyA);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 10 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 167..171
    src/ending-punctuation.spec.js on lines 303..307
    src/ending-punctuation.spec.js on lines 552..556
    src/ending-punctuation.spec.js on lines 915..919
    src/ending-punctuation.spec.js on lines 1157..1161
    src/ending-punctuation.spec.js on lines 1294..1298
    src/ending-punctuation.spec.js on lines 1433..1437
    src/ending-punctuation.spec.js on lines 1636..1640
    src/ending-punctuation.spec.js on lines 2025..2029
    src/ending-punctuation.spec.js on lines 2474..2478

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

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

          it('Finds record valid - Punc $a (only)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidOnlyA);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 10 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 167..171
    src/ending-punctuation.spec.js on lines 303..307
    src/ending-punctuation.spec.js on lines 552..556
    src/ending-punctuation.spec.js on lines 915..919
    src/ending-punctuation.spec.js on lines 1157..1161
    src/ending-punctuation.spec.js on lines 1433..1437
    src/ending-punctuation.spec.js on lines 1636..1640
    src/ending-punctuation.spec.js on lines 2025..2029
    src/ending-punctuation.spec.js on lines 2353..2357
    src/ending-punctuation.spec.js on lines 2474..2478

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

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

          it('Finds record valid - 662 English, with punc $a', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid662EngYes);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 10 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 167..171
    src/ending-punctuation.spec.js on lines 303..307
    src/ending-punctuation.spec.js on lines 552..556
    src/ending-punctuation.spec.js on lines 915..919
    src/ending-punctuation.spec.js on lines 1157..1161
    src/ending-punctuation.spec.js on lines 1294..1298
    src/ending-punctuation.spec.js on lines 1433..1437
    src/ending-punctuation.spec.js on lines 1636..1640
    src/ending-punctuation.spec.js on lines 2353..2357
    src/ending-punctuation.spec.js on lines 2474..2478

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

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

          it('Finds record valid - Punc $a (only)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - 655 Finnish, without punc', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid655FinNo2);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Ind2 = 1, $c 1995-', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidInd2v1Short);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Punc $a (only)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidA);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Punc $a, but following fields, $e no punc (last)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Punc $d (last of two) followed by $g', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidComplex);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - 647 Fast, punc char at end', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid647FastEndPunc);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

        it('Finds the record valid', async () => {
          const validator = await validatorFactory();
          const result = await validator.validate(recordValid);
          expect(result.valid).to.eql(true);
        });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Punc $i & punc $u ($u is URL, should pass)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidPuncU);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - 648 Finnish, without punc', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordVali648dFinNo);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Punc $d (last of two)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidDD);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Punc $a (without $u)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Punc $a', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidOnlyA);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Punc $c', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidEndC);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Ind2 = 4, copyright', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidCopyright);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Punc $a (last) & punc $b (mandatory)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidAB);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Punc $b', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidSimple);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351

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

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

          it('Finds record valid - Punc char $g (after $c)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidEndG);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - 648 Fast, without punc', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid648FastNo);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - 650 English, punc (no control)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid650EngNoControl);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - 657 English, with punc $z', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid657EngYes);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - 655 Finnish, no punc $a', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid655FinNo);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - 655 English, with punc $a (no control)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid655EngYesNoControl);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Ind2 = 1, $c 1995-2006.', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidInd2v1);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - 655 English, with punc $y', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid655EngYes);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Ind2 = 2, no $c', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidInd2v2WithoutC);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - 650 Finnish, without punc', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid650FinNo);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - 656 Finnish, without punc $a', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid656FinNo);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - 658 English, with punc $d', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid658EngYes);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Punc $p', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidMultiple);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Punc $a (with $u) ', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValidWithU);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Punc $b', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1282..1286
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

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

          it('Finds record valid - Punc $i (last before $u)', async () => {
            const validator = await validatorFactory();
            const result = await validator.validate(recordValid);
            expect(result.valid).to.eql(true);
          });
    Severity: Major
    Found in src/ending-punctuation.spec.js and 32 other locations - About 1 hr to fix
    src/ending-punctuation.spec.js on lines 102..106
    src/ending-punctuation.spec.js on lines 161..165
    src/ending-punctuation.spec.js on lines 291..295
    src/ending-punctuation.spec.js on lines 297..301
    src/ending-punctuation.spec.js on lines 540..544
    src/ending-punctuation.spec.js on lines 546..550
    src/ending-punctuation.spec.js on lines 711..715
    src/ending-punctuation.spec.js on lines 717..721
    src/ending-punctuation.spec.js on lines 723..727
    src/ending-punctuation.spec.js on lines 729..733
    src/ending-punctuation.spec.js on lines 891..895
    src/ending-punctuation.spec.js on lines 897..901
    src/ending-punctuation.spec.js on lines 903..907
    src/ending-punctuation.spec.js on lines 909..913
    src/ending-punctuation.spec.js on lines 1145..1149
    src/ending-punctuation.spec.js on lines 1151..1155
    src/ending-punctuation.spec.js on lines 1288..1292
    src/ending-punctuation.spec.js on lines 1427..1431
    src/ending-punctuation.spec.js on lines 1606..1610
    src/ending-punctuation.spec.js on lines 1612..1616
    src/ending-punctuation.spec.js on lines 1618..1622
    src/ending-punctuation.spec.js on lines 1624..1628
    src/ending-punctuation.spec.js on lines 1630..1634
    src/ending-punctuation.spec.js on lines 1983..1987
    src/ending-punctuation.spec.js on lines 1989..1993
    src/ending-punctuation.spec.js on lines 1995..1999
    src/ending-punctuation.spec.js on lines 2001..2005
    src/ending-punctuation.spec.js on lines 2007..2011
    src/ending-punctuation.spec.js on lines 2013..2017
    src/ending-punctuation.spec.js on lines 2019..2023
    src/ending-punctuation.spec.js on lines 2347..2351
    src/ending-punctuation.spec.js on lines 2468..2472

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

    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: '',
            fields: [
              {
                tag: '520',
    Severity: Major
    Found in src/ending-punctuation.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 1164..1174
    src/ending-punctuation.spec.js on lines 1400..1410
    src/ending-punctuation.spec.js on lines 1440..1450
    src/field-exclusion.spec.js on lines 432..442

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

          const recordValidA = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '340',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 432..442

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

          const recordValidWithoutYMissingA = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '242',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 432..442

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

          const recordInvalid = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '567',
    Severity: Major
    Found in src/ending-punctuation.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/field-exclusion.spec.js on lines 432..442

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

          const recordInvalid = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '520',
    Severity: Major
    Found in src/ending-punctuation.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 1400..1410
    src/ending-punctuation.spec.js on lines 1440..1450
    src/field-exclusion.spec.js on lines 432..442

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

          const recordValid = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '567',
    Severity: Major
    Found in src/ending-punctuation.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 1440..1450
    src/field-exclusion.spec.js on lines 432..442

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

          const recordValidWithoutY = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '242',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 8 other locations - About 1 hr to fix
    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
    src/field-exclusion.spec.js on lines 432..442

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

          const recordInvalidA = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '340',
    Severity: Major
    Found in src/ending-punctuation.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 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
    src/field-exclusion.spec.js on lines 432..442

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

          const recordValidOnlyA = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '036',
    Severity: Major
    Found in src/ending-punctuation.spec.js and 16 other locations - About 1 hr to fix
    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/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 recordInvalid655EngNoNoControl = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '655',
    Severity: Major
    Found in src/ending-punctuation.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 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/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 recordValidOnlyA = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '538',
    Severity: Major
    Found in src/ending-punctuation.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 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/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 recordInvalidOnlyA = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '538',
    Severity: Major
    Found in src/ending-punctuation.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 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/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 recordValidOnlyA = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '760',
    Severity: Major
    Found in src/ending-punctuation.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 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/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 recordValid655EngYesNoControl = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '655',
    Severity: Major
    Found in src/ending-punctuation.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 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/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 recordInvalidOnlyA = new MarcRecord({
            leader: '',
            fields: [
              {
                tag: '760',
    Severity: Major
    Found in src/ending-punctuation.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/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/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

    There are no issues that match your filters.

    Category
    Status