aurelia/aurelia

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

Summary

Maintainability
F
6 days
Test Coverage

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

import { Constructable, resolve } from '@aurelia/kernel';
import { BindingMode, CustomAttribute, CustomElement, ICustomElementViewModel, INode, ValueConverter } from '@aurelia/runtime-html';
import { assert, createFixture } from '@aurelia/testing';

describe('3-runtime-html/spread.spec.ts', function () {
Severity: Major
Found in packages/__tests__/src/3-runtime-html/spread.spec.ts - About 1 day to fix

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

        it('spreads with literal object expression', function () {
          const { assertHtml, component, flush } = createFixture('<el repeat.for="item of items" ...$bindables="{ id: item.id, class: item.class }">', {
            items: [
              { id: 1, class: 'a' },
              { id: 2, class: 'b' }
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 2 other locations - About 4 hrs to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 355..368
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 476..489

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 128.

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

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

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

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

    Refactorings

    Further Reading

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

        it('spreads with ... syntax', function () {
          const { assertHtml, component, flush } = createFixture('<el repeat.for="item of items" ...item>', {
            items: [
              { id: 1, class: 'a' },
              { id: 2, class: 'b' },
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 2 other locations - About 4 hrs to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 461..474
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 476..489

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 128.

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

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

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

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

    Refactorings

    Further Reading

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

        it('spreads with ...$bindables= syntax', function () {
          const { assertHtml, component, flush } = createFixture('<el repeat.for="item of items" ...$bindables="item">', {
            items: [
              { id: 1, class: 'a' },
              { id: 2, class: 'b' },
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 2 other locations - About 4 hrs to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 355..368
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 461..474

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 128.

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

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

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

    See codeclimate-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('works with $attr when used before ...$attrs on the same element', function () {
          const ElWithAttrs = CustomElement.define({
            name: 'el-with-attrs',
            template: '<el ...item ...$attrs>',
            capture: true,
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 1 other location - About 4 hrs to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 618..631

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 116.

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

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

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

    See codeclimate-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('works with $attr when used after $attrs on the same element', function () {
          const ElWithAttrs = CustomElement.define({
            name: 'el-with-attrs',
            template: '<el ...$attrs ...item>',
            capture: true,
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 1 other location - About 4 hrs to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 603..616

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 116.

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

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

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

    See codeclimate-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('spreads custom attribute (multi binding syntax)', {
            template: '<my-input my-attr="value.bind: size">',
            component: { size: 20 },
            registrations: [MyAttr],
            assertFn: ({ appHost }) => {
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 1 other location - About 3 hrs to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 184..192

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 105.

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

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

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

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

    Refactorings

    Further Reading

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

          $it('spreads custom attribute (primary binding syntax)', {
            template: '<my-input my-attr.bind="size">',
            component: { size: 20 },
            registrations: [MyAttr],
            assertFn: ({ appHost }) => {
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 1 other location - About 3 hrs to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 194..202

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 105.

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

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

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

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

    Refactorings

    Further Reading

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

            assertFn: ({ appHost }) => {
              assert.notStrictEqual((appHost.querySelector('form-input') as any).value, 'Aurelia');
              assert.strictEqual(appHost.querySelector('input').value, 'Aurelia');
            },
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 2 other locations - About 1 hr to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 225..228
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 235..238

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 69.

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

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

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

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

            assertFn: ({ appHost }) => {
              assert.notStrictEqual((appHost.querySelector('form-input') as any).value, 'Aurelia');
              assert.strictEqual(appHost.querySelector('input').value, 'Aurelia');
            },
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 2 other locations - About 1 hr to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 235..238
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 245..248

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 69.

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

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

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

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

            assertFn: ({ appHost }) => {
              assert.notStrictEqual((appHost.querySelector('form-input') as any).value, 'Aurelia');
              assert.strictEqual(appHost.querySelector('input').value, 'Aurelia');
            },
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 2 other locations - About 1 hr to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 225..228
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 245..248

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 69.

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

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

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

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

    Refactorings

    Further Reading

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

        $it('does not throw when there are nothing to capture', {
          template: '<my-input>',
          component: { message: 'Aurelia' },
          assertFn: ({ appHost }) => {
            assert.strictEqual(appHost.querySelector('input').value, '');
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 2 other locations - About 1 hr to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 17..23
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 37..43

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 66.

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

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

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

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

    Refactorings

    Further Reading

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

        $it('does not throw when capture: false', {
          template: '<no-capture-input value.bind="message">',
          component: { message: 'Aurelia' },
          assertFn: ({ appHost }) => {
            assert.strictEqual(appHost.querySelector('input').value, '');
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 2 other locations - About 1 hr to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 17..23
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 45..51

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 66.

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

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

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

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

    Refactorings

    Further Reading

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

        $it('works single layer of ...attrs', {
          template: '<my-input value.bind="message">',
          component: { message: 'Aurelia' },
          assertFn: ({ appHost }) => {
            assert.strictEqual(appHost.querySelector('input').value, 'Aurelia');
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 2 other locations - About 1 hr to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 37..43
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 45..51

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 66.

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

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

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

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

    Refactorings

    Further Reading

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

          const { assertHtml } = createFixture('<el repeat.for="item of items" ...item.details>', {
            items: [
              { details: { id: 1, class: 'a' } },
              { details: { id: 2, class: 'b' } },
            ]
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 1 other location - About 1 hr to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 530..535

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 64.

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

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

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

    See codeclimate-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 { assertHtml } = createFixture('<el ...items[0].details>', {
            items: [
              { details: { id: 1, class: 'a' } },
              { details: { id: 2, class: 'b' } },
            ]
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 1 other location - About 1 hr to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 519..524

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 64.

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

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

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

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

    Refactorings

    Further Reading

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

        it('ignores usage of $bindables without command', function () {
          const { assertHtml } = createFixture('<el $bindables="item">', {
            item: { id: 1, class: 'a' },
          }, [El]);
    
    
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 2 other locations - About 1 hr to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 502..508
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 510..516

    Duplicated Code

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

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

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

        it('creates binding in the order in the template (after)', function () {
          const { assertHtml } = createFixture('<el ...item id.bind="3">', {
            item: { id: 1, class: 'a' },
          }, [El]);
    
    
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 2 other locations - About 1 hr to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 453..459
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 502..508

    Duplicated Code

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

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

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

        it('creates binding in the order in the template (before)', function () {
          const { assertHtml } = createFixture('<el id.bind="3" ...item>', {
            item: { id: 1, class: 'a' },
          }, [El]);
    
    
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/spread.spec.ts and 2 other locations - About 1 hr to fix
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 453..459
    packages/__tests__/src/3-runtime-html/spread.spec.ts on lines 510..516

    Duplicated Code

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

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

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