NatLibFi/marc-record-validators-melinda

View on GitHub

Showing 1,137 of 1,137 total issues

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

    {
      'tag': '509',
      'repeatable': true,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
Severity: Major
Found in src/melindaCustomMergeFields.js and 12 other locations - About 3 hrs to fix
src/melindaCustomMergeFields.js on lines 66..79
src/melindaCustomMergeFields.js on lines 124..137
src/melindaCustomMergeFields.js on lines 458..471
src/melindaCustomMergeFields.js on lines 531..544
src/melindaCustomMergeFields.js on lines 1617..1630
src/melindaCustomMergeFields.js on lines 1669..1682
src/melindaCustomMergeFields.js on lines 2023..2036
src/melindaCustomMergeFields.js on lines 2568..2581
src/melindaCustomMergeFields.js on lines 2693..2706
src/melindaCustomMergeFields.js on lines 2802..2815
src/melindaCustomMergeFields.js on lines 4886..4899
src/melindaCustomMergeFields.js on lines 4921..4934

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

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

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

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

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

Refactorings

Further Reading

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

    {
      'tag': '500',
      'repeatable': true,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
Severity: Major
Found in src/melindaCustomMergeFields.js and 12 other locations - About 3 hrs to fix
src/melindaCustomMergeFields.js on lines 66..79
src/melindaCustomMergeFields.js on lines 124..137
src/melindaCustomMergeFields.js on lines 458..471
src/melindaCustomMergeFields.js on lines 531..544
src/melindaCustomMergeFields.js on lines 1617..1630
src/melindaCustomMergeFields.js on lines 1669..1682
src/melindaCustomMergeFields.js on lines 2141..2154
src/melindaCustomMergeFields.js on lines 2568..2581
src/melindaCustomMergeFields.js on lines 2693..2706
src/melindaCustomMergeFields.js on lines 2802..2815
src/melindaCustomMergeFields.js on lines 4886..4899
src/melindaCustomMergeFields.js on lines 4921..4934

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

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

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

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

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

Refactorings

Further Reading

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

    {
      'tag': '357',
      'repeatable': false,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
Severity: Major
Found in src/melindaCustomMergeFields.js and 12 other locations - About 3 hrs to fix
src/melindaCustomMergeFields.js on lines 66..79
src/melindaCustomMergeFields.js on lines 124..137
src/melindaCustomMergeFields.js on lines 458..471
src/melindaCustomMergeFields.js on lines 531..544
src/melindaCustomMergeFields.js on lines 1617..1630
src/melindaCustomMergeFields.js on lines 2023..2036
src/melindaCustomMergeFields.js on lines 2141..2154
src/melindaCustomMergeFields.js on lines 2568..2581
src/melindaCustomMergeFields.js on lines 2693..2706
src/melindaCustomMergeFields.js on lines 2802..2815
src/melindaCustomMergeFields.js on lines 4886..4899
src/melindaCustomMergeFields.js on lines 4921..4934

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

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

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

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

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

Refactorings

Further Reading

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

    {
      'tag': '015',
      'repeatable': true,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
Severity: Major
Found in src/melindaCustomMergeFields.js and 12 other locations - About 3 hrs to fix
src/melindaCustomMergeFields.js on lines 124..137
src/melindaCustomMergeFields.js on lines 458..471
src/melindaCustomMergeFields.js on lines 531..544
src/melindaCustomMergeFields.js on lines 1617..1630
src/melindaCustomMergeFields.js on lines 1669..1682
src/melindaCustomMergeFields.js on lines 2023..2036
src/melindaCustomMergeFields.js on lines 2141..2154
src/melindaCustomMergeFields.js on lines 2568..2581
src/melindaCustomMergeFields.js on lines 2693..2706
src/melindaCustomMergeFields.js on lines 2802..2815
src/melindaCustomMergeFields.js on lines 4886..4899
src/melindaCustomMergeFields.js on lines 4921..4934

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

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

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

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

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

Refactorings

Further Reading

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

    {
      'tag': '020',
      'repeatable': true,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
Severity: Major
Found in src/melindaCustomMergeFields.js and 12 other locations - About 3 hrs to fix
src/melindaCustomMergeFields.js on lines 66..79
src/melindaCustomMergeFields.js on lines 458..471
src/melindaCustomMergeFields.js on lines 531..544
src/melindaCustomMergeFields.js on lines 1617..1630
src/melindaCustomMergeFields.js on lines 1669..1682
src/melindaCustomMergeFields.js on lines 2023..2036
src/melindaCustomMergeFields.js on lines 2141..2154
src/melindaCustomMergeFields.js on lines 2568..2581
src/melindaCustomMergeFields.js on lines 2693..2706
src/melindaCustomMergeFields.js on lines 2802..2815
src/melindaCustomMergeFields.js on lines 4886..4899
src/melindaCustomMergeFields.js on lines 4921..4934

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

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

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

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

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

Refactorings

Further Reading

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

    {
      'tag': '546',
      'repeatable': true,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
Severity: Major
Found in src/melindaCustomMergeFields.js and 12 other locations - About 3 hrs to fix
src/melindaCustomMergeFields.js on lines 66..79
src/melindaCustomMergeFields.js on lines 124..137
src/melindaCustomMergeFields.js on lines 458..471
src/melindaCustomMergeFields.js on lines 531..544
src/melindaCustomMergeFields.js on lines 1617..1630
src/melindaCustomMergeFields.js on lines 1669..1682
src/melindaCustomMergeFields.js on lines 2023..2036
src/melindaCustomMergeFields.js on lines 2141..2154
src/melindaCustomMergeFields.js on lines 2693..2706
src/melindaCustomMergeFields.js on lines 2802..2815
src/melindaCustomMergeFields.js on lines 4886..4899
src/melindaCustomMergeFields.js on lines 4921..4934

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

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

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

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

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

Refactorings

Further Reading

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

    {
      'tag': '049',
      'repeatable': false,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
Severity: Major
Found in src/melindaCustomMergeFields.js and 12 other locations - About 3 hrs to fix
src/melindaCustomMergeFields.js on lines 66..79
src/melindaCustomMergeFields.js on lines 124..137
src/melindaCustomMergeFields.js on lines 458..471
src/melindaCustomMergeFields.js on lines 1617..1630
src/melindaCustomMergeFields.js on lines 1669..1682
src/melindaCustomMergeFields.js on lines 2023..2036
src/melindaCustomMergeFields.js on lines 2141..2154
src/melindaCustomMergeFields.js on lines 2568..2581
src/melindaCustomMergeFields.js on lines 2693..2706
src/melindaCustomMergeFields.js on lines 2802..2815
src/melindaCustomMergeFields.js on lines 4886..4899
src/melindaCustomMergeFields.js on lines 4921..4934

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

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

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

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

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

Refactorings

Further Reading

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

    {
      'tag': '351',
      'repeatable': true,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
Severity: Major
Found in src/melindaCustomMergeFields.js and 12 other locations - About 3 hrs to fix
src/melindaCustomMergeFields.js on lines 66..79
src/melindaCustomMergeFields.js on lines 124..137
src/melindaCustomMergeFields.js on lines 458..471
src/melindaCustomMergeFields.js on lines 531..544
src/melindaCustomMergeFields.js on lines 1669..1682
src/melindaCustomMergeFields.js on lines 2023..2036
src/melindaCustomMergeFields.js on lines 2141..2154
src/melindaCustomMergeFields.js on lines 2568..2581
src/melindaCustomMergeFields.js on lines 2693..2706
src/melindaCustomMergeFields.js on lines 2802..2815
src/melindaCustomMergeFields.js on lines 4886..4899
src/melindaCustomMergeFields.js on lines 4921..4934

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

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

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

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

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

Refactorings

Further Reading

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

    {
      'tag': '920',
      'repeatable': true,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
Severity: Major
Found in src/melindaCustomMergeFields.js and 12 other locations - About 3 hrs to fix
src/melindaCustomMergeFields.js on lines 66..79
src/melindaCustomMergeFields.js on lines 124..137
src/melindaCustomMergeFields.js on lines 458..471
src/melindaCustomMergeFields.js on lines 531..544
src/melindaCustomMergeFields.js on lines 1617..1630
src/melindaCustomMergeFields.js on lines 1669..1682
src/melindaCustomMergeFields.js on lines 2023..2036
src/melindaCustomMergeFields.js on lines 2141..2154
src/melindaCustomMergeFields.js on lines 2568..2581
src/melindaCustomMergeFields.js on lines 2693..2706
src/melindaCustomMergeFields.js on lines 2802..2815
src/melindaCustomMergeFields.js on lines 4921..4934

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

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

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

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

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

Refactorings

Further Reading

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

    {
      'tag': '924',
      'repeatable': false,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
Severity: Major
Found in src/melindaCustomMergeFields.js and 12 other locations - About 3 hrs to fix
src/melindaCustomMergeFields.js on lines 66..79
src/melindaCustomMergeFields.js on lines 124..137
src/melindaCustomMergeFields.js on lines 458..471
src/melindaCustomMergeFields.js on lines 531..544
src/melindaCustomMergeFields.js on lines 1617..1630
src/melindaCustomMergeFields.js on lines 1669..1682
src/melindaCustomMergeFields.js on lines 2023..2036
src/melindaCustomMergeFields.js on lines 2141..2154
src/melindaCustomMergeFields.js on lines 2568..2581
src/melindaCustomMergeFields.js on lines 2693..2706
src/melindaCustomMergeFields.js on lines 2802..2815
src/melindaCustomMergeFields.js on lines 4886..4899

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

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

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

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

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

Refactorings

Further Reading

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

    {
      'tag': '584',
      'repeatable': true,
      'fieldType': 'dataField',
      'indicators': {'ind1': ' ', 'ind2': ' '},
Severity: Major
Found in src/melindaCustomMergeFields.js and 12 other locations - About 3 hrs to fix
src/melindaCustomMergeFields.js on lines 66..79
src/melindaCustomMergeFields.js on lines 124..137
src/melindaCustomMergeFields.js on lines 458..471
src/melindaCustomMergeFields.js on lines 531..544
src/melindaCustomMergeFields.js on lines 1617..1630
src/melindaCustomMergeFields.js on lines 1669..1682
src/melindaCustomMergeFields.js on lines 2023..2036
src/melindaCustomMergeFields.js on lines 2141..2154
src/melindaCustomMergeFields.js on lines 2568..2581
src/melindaCustomMergeFields.js on lines 2693..2706
src/melindaCustomMergeFields.js on lines 4886..4899
src/melindaCustomMergeFields.js on lines 4921..4934

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

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

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

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

See codeclimate-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 $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 - 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 - 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', 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 2 locations. Consider refactoring.
Open

    it('Finds the record valid', async () => {
      const validator = await validatorFactory();
      const record = new MarcRecord({
        fields: [{tag: '700', subfields: [{code: 'e', value: 'foo,bar'}]}]
      });
Severity: Major
Found in src/double-commas.spec.js and 1 other location - About 3 hrs to fix
src/double-commas.spec.js on lines 27..35

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

Severity
Category
Status
Source
Language