aurelia/aurelia

View on GitHub
packages/__tests__/src/3-runtime-html/interpolation.spec.ts

Summary

Maintainability
F
1 wk
Test Coverage

File interpolation.spec.ts has 695 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import {
  assert,
  createContainer,
  createFixture,
  createObserverLocator,
Severity: Major
Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts - About 1 day to fix

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

        it('interpolates value attr of <input />', async function () {
          const { ctx, component, appHost, startPromise, tearDown } = createFixture(
            `<input value="\${progress}">`,
            class App {
              public progress = 0;
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 1 other location - About 6 hrs to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 717..735

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 171.

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

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

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

    See codeclimate-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('interpolates value attr of <textarea />', async function () {
          const { ctx, component, appHost, startPromise, tearDown } = createFixture(
            `<textarea value="\${progress}">`,
            class App {
              public progress = 0;
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 1 other location - About 6 hrs to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 697..715

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 171.

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

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

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

    See codeclimate-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

          {
            expected: `null${testDateString}`,
            expectedStrictMode: `null${testDateString}`,
            expectedValueAfterChange: `null${ThreeDaysDateString}`,
            changeFnc: (_val: Date) => {
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 1 other location - About 3 hrs to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 137..145

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 100.

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

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

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

    See codeclimate-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

          {
            expected: `undefined${testDateString}`,
            expectedStrictMode: `undefined${testDateString}`,
            expectedValueAfterChange: `undefined${ThreeDaysDateString}`,
            changeFnc: (_val: Date) => {
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 1 other location - About 3 hrs to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 146..154

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 100.

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

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

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

    See codeclimate-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

        divs.forEach((div, idx) => {
          assert.strictEqual(div.textContent, `$${idx + 1}`);
          const b = div.querySelector('b');
          assert.strictEqual(b.textContent, String(idx + 1));
        });
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 2 other locations - About 2 hrs to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 616..620
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 623..627

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 86.

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

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

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

    See codeclimate-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

        divs.forEach((div, idx) => {
          assert.strictEqual(div.textContent, `$${idx + 11}`);
          const b = div.querySelector('b');
          assert.strictEqual(b.textContent, String(idx + 11));
        });
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 2 other locations - About 2 hrs to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 604..608
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 616..620

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 86.

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

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

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

    See codeclimate-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

        divs.forEach((div, idx) => {
          assert.strictEqual(div.textContent, `$${idx + 11}`);
          const b = div.querySelector('b');
          assert.strictEqual(b.textContent, String(idx + 11));
        });
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 2 other locations - About 2 hrs to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 604..608
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 623..627

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 86.

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

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

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

    See codeclimate-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

            binding.partBindings[0].handleChange = (handleChange => {
              return function (...args: unknown[]) {
                handleChange1CallCount++;
                return handleChange.apply(this, args);
              };
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 2 other locations - About 2 hrs to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 362..367
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 460..465

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 75.

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

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

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

    See codeclimate-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

            binding.partBindings[1].handleChange = (handleChange => {
              return function (...args: unknown[]) {
                handleChange2CallCount++;
                return handleChange.apply(this, args);
              };
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 2 other locations - About 2 hrs to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 362..367
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 454..459

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 75.

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

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

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

    See codeclimate-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

            binding.partBindings[0].handleChange = (handleChange => {
              return function (...args: unknown[]) {
                handleChangeCallCount++;
                return handleChange.apply(this, args);
              };
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 2 other locations - About 2 hrs to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 454..459
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 460..465

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 75.

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

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

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

    See codeclimate-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

          {
            expected: testDateString,
            expectedValueAfterChange: ThreeDaysDateString,
            changeFnc: (_val: Date) => {
              return new Date(ThreeDaysDateString);
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 1 other location - About 1 hr to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 155..162

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 68.

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

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

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

    See codeclimate-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

          {
            expected: testDateString,
            expectedValueAfterChange: ThreeHoursAheadDateString,
            changeFnc: (_val: Date) => {
              return new Date(ThreeHoursAheadDateString);
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 1 other location - About 1 hr to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 129..136

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 68.

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

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

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

    See codeclimate-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

            binding.updateTarget = (updateTarget => {
              return function (...args: unknown[]) {
                updateTargetCallCount++;
                return updateTarget.apply(this, args);
              };
    packages/__tests__/src/2-runtime/ast.integration.spec.ts on lines 78..83
    packages/__tests__/src/2-runtime/ast.integration.spec.ts on lines 168..173
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 448..453

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 59.

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

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

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

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

    Refactorings

    Further Reading

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

            binding.updateTarget = (updateTarget => {
              return function (...args: unknown[]) {
                updateTargetCallCount++;
                return updateTarget.apply(this, args);
              };
    packages/__tests__/src/2-runtime/ast.integration.spec.ts on lines 78..83
    packages/__tests__/src/2-runtime/ast.integration.spec.ts on lines 168..173
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 356..361

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 59.

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

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

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

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

    Refactorings

    Further Reading

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

              private toNode(html: string) {
                const parser = this.p.document.createElement('div');
                parser.innerHTML = html;
                return parser.firstChild;
              }
    Severity: Minor
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 1 other location - About 55 mins to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 591..595

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 54.

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

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

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

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

    Refactorings

    Further Reading

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

              private toNode(html: string) {
                const parser = this.p.document.createElement('div');
                parser.innerHTML = html;
                return parser.firstChild;
              }
    Severity: Minor
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 1 other location - About 55 mins to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 654..658

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 54.

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

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

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

    See codeclimate-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

          {
            expected: 'true',
            expectedValueAfterChange: 'false',
            changeFnc: (val) => !val,
            app: class { public value = true; },
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 2 other locations - About 50 mins to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 107..114
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 115..122

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 51.

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

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

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

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

    Refactorings

    Further Reading

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

          {
            expected: 'false',
            expectedValueAfterChange: 'true',
            changeFnc: (val) => !val,
            app: class { public value = false; },
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 2 other locations - About 50 mins to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 99..106
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 115..122

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 51.

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

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

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

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

    Refactorings

    Further Reading

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

          {
            expected: 'false',
            expectedValueAfterChange: 'false',
            changeFnc: (val) => !val,
            app: class { public value = false; },
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/interpolation.spec.ts and 2 other locations - About 50 mins to fix
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 99..106
    packages/__tests__/src/3-runtime-html/interpolation.spec.ts on lines 107..114

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 51.

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

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

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

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

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status