aurelia/aurelia

View on GitHub
packages/__tests__/src/3-runtime-html/au-slot.spec.tsx

Summary

Maintainability
F
1 mo
Test Coverage

Function getTestData has 1708 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function* getTestData() {
    const createMyElement = (template: string, containerless = false) => {
      class MyElement {
        public readonly slots: IAuSlotsInfo = resolve(IAuSlotsInfo);
        public constructor() {
Severity: Major
Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx - About 1 wk to fix

    File au-slot.spec.tsx has 2097 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { delegateSyntax } from '@aurelia/compat-v1';
    import { IContainer, inject, newInstanceForScope, resolve } from '@aurelia/kernel';
    import { BindingMode, Aurelia, AuSlotsInfo, bindable, customElement, CustomElement, IAuSlotsInfo, IPlatform, ValueConverter } from '@aurelia/runtime-html';
    import { assert, createFixture, hJsx, TestContext } from '@aurelia/testing';
    import { createSpecFunction, TestExecutionContext, TestFunction } from '../util.js';
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx - About 5 days to fix

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

              async function ({ host, platform }) {
                platform.domWriteQueue.flush();
                const meu = host.querySelector('my-element-user');
                const me = host.querySelector('my-element');
                assert.html.innerEqual(meu, `<my-element><div>${fooValue}</div></my-element>`, 'my-element-user.innerHtml');
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 1 day to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1672..1683

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 210.

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

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

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

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

              async function ({ host, platform }) {
                platform.domWriteQueue.flush();
                const meu = host.querySelector('my-element-user');
                const me = host.querySelector('my-element');
                assert.html.innerEqual(meu, `<my-element><div>${fooValue}</div></my-element>`, 'my-element-user.innerHtml');
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 1 day to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1640..1651

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 210.

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

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

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

      See codeclimate-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('with projection - with $host',
              async function ({ host, platform, app }) {
                const ce = host.querySelector('my-element');
                const button = ce.querySelector('button');
                button.click();
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 6 hrs to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 2038..2047

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 157.

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

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

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

      See codeclimate-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('with projection - w/o $host',
              async function ({ host, platform, app }) {
                const ce = host.querySelector('my-element');
                const button = ce.querySelector('button');
                button.click();
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 6 hrs to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 2027..2036

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 157.

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

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

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

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

        class AuSlotTestExecutionContext implements TestExecutionContext<any> {
          private _scheduler: IPlatform;
          public constructor(
            public ctx: TestContext,
            public au: Aurelia,
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 5 hrs to fix
      packages/__tests__/src/3-runtime-html/repeat.vc.bb.spec.ts on lines 11..22

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 136.

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

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

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

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

              [
                CustomElement.define({
                  name: 'mdc', template:
                    `<mdc-tab-bar
                  ><template au-slot
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 4 hrs to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1896..1912

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 131.

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

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

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

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

              [
                CustomElement.define({
                  name: 'mdc', template:
                    `<mdc-tab-bar
                  ><mdc-tab au-slot repeat.for="i of 3" id="mdc-\${id}-\${i}" click.trigger="increase()">\${count + i}</mdc-tab>`
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 4 hrs to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1856..1873

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 131.

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

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

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

      See codeclimate-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('provides right resources for slotted view', function () {
            const { assertText } = createFixture(
              '<el></el>',
              {},
              [
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 4 hrs to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 2191..2207

      Duplicated Code

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

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

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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('provides right resources for passed through <au-slot>', function () {
            const { assertText } = createFixture(
              '<el></el>',
              {},
              [
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 4 hrs to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 2173..2189

      Duplicated Code

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

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

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

              function ({ host, platform }) {
                const input = host.querySelector('input');
                input.value = 'hello';
                input.dispatchEvent(new platform.CustomEvent('change'));
                platform.domWriteQueue.flush();
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 3 hrs to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1805..1811

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 101.

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

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

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

      See codeclimate-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 2 layers of repeaters', function () {
            const { assertText } = createFixture('<my-el>', class App {}, [
              CustomElement.define({
                name: 'my-el',
                template: `<div repeat.for="i of 1">
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 3 hrs to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 2114..2137

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 101.

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

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

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

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

              function ({ host, platform }) {
                const input = host.querySelector('input');
                input.value = 'hello';
                input.dispatchEvent(new platform.CustomEvent('change'));
                platform.domWriteQueue.flush();
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 3 hrs to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1821..1827

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 101.

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

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

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

      See codeclimate-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 3 or more layers of repeaters + au slot', function () {
            const { assertText } = createFixture('<my-el>', class App {}, [
              CustomElement.define({
                name: 'my-el',
                template: `<div repeat.for="i of 1">
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 3 hrs to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 2093..2112

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 101.

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

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

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

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

          {
            yield new TestData(
              'works with [containerless] + ([repeat] + custom element + [au-slot])',
              `<my-element><my-child au-slot repeat.for="i of 3" value.bind="i"></my-child></my-element>`,
              [
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 2 hrs to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 411..424

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 89.

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

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

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

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

          {
            yield new TestData(
              'works with [if][containerless] + ([repeat] + custom element + [au-slot])',
              `<my-element if.bind="true"><my-child au-slot repeat.for="i of 3" value.bind="i"></my-child></my-element>`,
              [
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 2 hrs to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 396..409

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 89.

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

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

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

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

            yield new TestData(
              'projection works correctly with nested elements with same slot name',
              `<my-element-s11>
                <template au-slot="s1">
                p1
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 3 other locations - About 2 hrs to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1229..1241
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1330..1338
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1339..1347

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 88.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'projection to a non-existing slot has no effect',
              `<my-element-s11>
                <template au-slot="s2">
                p1
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 3 other locations - About 2 hrs to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1165..1182
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1330..1338
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1339..1347

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 88.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'chain of [au-slot] and <au-slot> can be used to project content to a nested inner CE',
              `<lvl-one><div au-slot="s1">p</div></lvl-one>`,
              [
                CustomElement.define({ name: 'lvl-zero', template: `<au-slot name="s0"></au-slot>` }, class LvlZero { }),
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 3 other locations - About 2 hrs to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1165..1182
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1229..1241
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1339..1347

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 88.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'chain of [au-slot] and <au-slot> can be used to project content to a nested inner CE - with same slot name',
              `<lvl-one><div au-slot="x">p</div></lvl-one>`,
              [
                CustomElement.define({ name: 'lvl-zero', template: `<au-slot name="x"></au-slot>` }, class LvlZero { }),
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 3 other locations - About 2 hrs to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1165..1182
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1229..1241
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1330..1338

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 88.

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

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

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

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

      Refactorings

      Further Reading

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

            @customElement({
              name: 'ce-one',
              template: '<au-slot>dfb</au-slot><au-slot name="s1">s1fb</au-slot>',
            })
            class CeOne {
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 2 other locations - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1743..1752
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1753..1762

      Duplicated Code

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

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

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

            @customElement({
              name: 'ce-two',
              template: 'ce two',
            })
            class CeTwo {
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 2 other locations - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1733..1742
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1753..1762

      Duplicated Code

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

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

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

            @customElement({
              name: 'ce-three',
              template: '<au-slot name="s1">s1fb</au-slot><ce-one><span au-slot>dp</span></ce-one><ce-two></ce-two>',
            })
            class CeThree {
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 2 other locations - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1733..1742
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1743..1752

      Duplicated Code

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

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

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

            yield new TestData(
              'works with data from repeater scope - custom-element[repeat.for] - source: binding context in outer scope',
              `<my-element repeat.for="person of people">
                <template au-slot>
                  \${person.firstName}
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 3 other locations - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 682..699
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 701..716
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 718..736

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 62.

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

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

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

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

            yield new TestData(
              'works with data from repeater scope - custom-element[repeat.for] - source: override context in outer scope',
              `<let items.bind="['1', '2']"></let>
              <my-element repeat.for="item of items">
                <template au-slot>
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 3 other locations - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 682..699
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 718..736
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 738..752

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 62.

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

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

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

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

            yield new TestData(
              'works with data from repeater scope - template[repeat.for]>custom-element - source: binding context in outer scope',
              `<template>
                <template repeat.for="person of people">
                  <my-element>
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 3 other locations - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 682..699
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 701..716
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 738..752

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 62.

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

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

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

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

            yield new TestData(
              'works with data from repeater scope - template[repeat.for]>custom-element - source: override context in outer scope',
              `<let items.bind="['1', '2']"></let>
               <template repeat.for="item of items">
                <my-element>
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 3 other locations - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 701..716
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 718..736
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 738..752

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 62.

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

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

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

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

            @customElement({
              name: 'my-element', template: `
            <au-slot name="grid">
              <au-slot name="header">
                <h4>First Name</h4>
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 2 other locations - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 616..633
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1040..1059

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 60.

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

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

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

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

      Refactorings

      Further Reading

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

              @customElement({
                name: 'my-element', template: `
              <au-slot name="grid">
                <au-slot name="header">
                  <h4>First Name</h4>
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 2 other locations - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 444..461
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1040..1059

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 60.

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

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

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

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

      Refactorings

      Further Reading

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

            @customElement({
              name: 'my-element', template: `
            <au-slot name="grid">
              <au-slot name="header">
                <h4>First Name</h4>
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 2 other locations - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 444..461
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 616..633

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 60.

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

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

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

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

      Refactorings

      Further Reading

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

            @customElement({ name: 'my-element', template: `static <au-slot>default</au-slot> <au-slot name="s1" if.bind="showS1">s1</au-slot> <au-slot name="s2">s2</au-slot>` })
            class MyElement {
              @bindable public showS1: boolean = true;
              public readonly slots: IAuSlotsInfo = resolve(IAuSlotsInfo);
            }
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 2 other locations - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 266..270
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 298..302

      Duplicated Code

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

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

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

            @customElement({ name: 'my-element', template: `<ul if.bind="someCondition"><au-slot></au-slot></ul> <div else><au-slot></au-slot></div>` })
            class MyElement {
              @bindable public someCondition: boolean = true;
              public readonly slots: IAuSlotsInfo = resolve(IAuSlotsInfo);
            }
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 2 other locations - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 241..245
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 266..270

      Duplicated Code

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

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

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

            @customElement({ name: 'my-element', template: `static <au-slot>default</au-slot> <au-slot name="s1" if.bind="showS1">s1</au-slot> <au-slot else name="s2">s2</au-slot>` })
            class MyElement {
              @bindable public showS1: boolean = true;
              public readonly slots: IAuSlotsInfo = resolve(IAuSlotsInfo);
            }
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 2 other locations - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 241..245
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 298..302

      Duplicated Code

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

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

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

            yield new TestData(
              'works with template controller - if-else - same slot name',
              `
              <my-element some-condition.bind="true"> <template au-slot><li>1</li><li>2</li></template> </my-element>
              <my-element some-condition.bind="false"> <template au-slot><span>1</span><span>2</span></template> </my-element>
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 500..519

      Duplicated Code

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

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

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

            yield new TestData(
              'supports replacing the repeater template',
              `<my-element people.bind="people">
                <template au-slot="grid">
                  <ul><li repeat.for="person of people">\${person.lastName}, \${person.firstName}</li></ul>
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 303..313

      Duplicated Code

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

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

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

            @customElement({ name: 'my-element-user', template: `<my-element><div au-slot>\${foo}</div></my-element>` })
            class MyElementUser {
              public foo: string;
              public attached() {
                this.foo = fooValue;
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1657..1663

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 56.

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

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

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

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

            @customElement({ name: 'my-element', template: `<au-slot></au-slot>` })
            class MyElement {
              public foo: string;
              public attached() {
                this.foo = fooValue;
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1627..1633

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 56.

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

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

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

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

          {
            yield new TestData(
              'works with [containerless] + ([repeat] + normal element + [au-slot])',
              `<my-element><template au-slot repeat.for="i of 3"><li>\${i}</li></template></my-element>`,
              [createMyElement('<ul><au-slot></au-slot></ul>', /* containerless */true)],
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 357..367

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 55.

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

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

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

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

          {
            yield new TestData(
              'works with [containerless] + child (normal element + [au-slot])',
              `<my-element><div au-slot>Hello</div></my-element>`,
              [createMyElement('<au-slot></au-slot>', /* containerless */true)],
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 1 hr to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 384..394

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 55.

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

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

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

            class MyElement {
              public readonly message: string = 'inner';
              public readonly slots: IAuSlotsInfo = resolve(IAuSlotsInfo);
              public constructor() {
                assert.instanceOf(this.slots, AuSlotsInfo);
      Severity: Minor
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 55 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 218..224

      Duplicated Code

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

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

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

            class MyElement {
              public readonly message: string = 'inner';
              public readonly slots: IAuSlotsInfo = resolve(IAuSlotsInfo);
              public constructor() {
                assert.instanceOf(this.slots, AuSlotsInfo);
      Severity: Minor
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 55 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 197..203

      Duplicated Code

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

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

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

          yield new TestData(
            'supports interpolations inside <template>',
            `<my-element> <template au-slot="s2">\${message}</template> <template au-slot="s1">p11</template> <template au-slot="s2">p21</template> <template au-slot="s1">\${message}</template> </my-element>`,
            [
              createMyElement(`static <au-slot>default</au-slot> <au-slot name="s1">s1</au-slot> <au-slot name="s2">s2</au-slot>`),
      Severity: Minor
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 126..133

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 49.

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

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

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

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

          yield new TestData(
            'supports n-1 projections',
            `<my-element> <div au-slot="s2">p20</div><div au-slot="s1">p11</div><div au-slot="s2">p21</div><div au-slot="s1">p12</div> </my-element>`,
            [
              createMyElement(`static <au-slot>default</au-slot> <au-slot name="s1">s1</au-slot> <au-slot name="s2">s2</au-slot>`),
      Severity: Minor
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 187..194

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 49.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'works with "with" on self - outer scope',
              `<let item.bind="people[1]"></let><my-element people.bind="people"> <div au-slot>\${item.lastName}</div> </my-element>`,
              [
                createMyElement(`<au-slot with.bind="{item: people[0]}">\${item.firstName}</au-slot>`),
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 530..537
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 539..553
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 555..562
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 564..577
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 579..591
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 593..600
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 933..940
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 941..948
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 949..956
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 965..972
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 973..980
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 981..988
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 989..996
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 997..1004
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1005..1012
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1013..1020

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'works with "with" on self',
              `<my-element people.bind="people"> <div au-slot>\${$host.item.lastName}</div> </my-element>`,
              [
                createMyElement(`<au-slot with.bind="{item: people[0]}">\${item.firstName}</au-slot>`),
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 530..537
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 539..553
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 555..562
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 564..577
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 579..591
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 593..600
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 933..940
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 941..948
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 957..964
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 965..972
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 973..980
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 981..988
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 989..996
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 997..1004
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1005..1012
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1013..1020

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'projection works for [repeat]>au-slot with another repeat',
              `<my-element><template au-slot="s1"><template repeat.for="i of 3">\${i*2}</template></template></my-element>`,
              [
                createMyElement(`
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 530..537
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 539..553
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 555..562
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 564..577
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 593..600
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 933..940
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 941..948
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 949..956
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 957..964
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 965..972
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 973..980
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 981..988
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 989..996
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 997..1004
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1005..1012
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1013..1020

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'works with "with" on parent - outer scope',
              `<let item.bind="people[1]"></let><my-element people.bind="people"> <div au-slot>\${item.lastName}</div> </my-element>`,
              [
                createMyElement(`<div with.bind="{item: people[0]}"><au-slot>\${item.firstName}</au-slot></div>`),
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 530..537
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 539..553
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 555..562
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 564..577
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 579..591
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 593..600
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 933..940
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 949..956
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 957..964
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 965..972
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 973..980
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 981..988
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 989..996
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 997..1004
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1005..1012
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1013..1020

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'works replacing div[with]>au-slot[name=s1]>au-slot[name=s2]',
              `<my-element people.bind="people"> <div au-slot="s2">\${$host.item.firstName}</div> </my-element>`,
              [
                createMyElement(`<div with.bind="{item: people[0]}"><au-slot name="s1">\${item.firstName}<au-slot name="s2">\${item.lastName}</au-slot></au-slot></div>`),
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 530..537
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 539..553
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 555..562
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 564..577
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 579..591
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 593..600
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 933..940
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 941..948
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 949..956
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 957..964
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 973..980
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 981..988
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 989..996
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 997..1004
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1005..1012
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1013..1020

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'works replacing au-slot[name=s1]>div[with]>au-slot[name=s2] - outer scope',
              `<let item.bind="people[1]"></let><my-element people.bind="people"> <div au-slot="s2">\${item.firstName}</div> </my-element>`,
              [
                createMyElement(`<au-slot name="s1">\${people[0].firstName}<div with.bind="{item: people[0]}"><au-slot name="s2">\${item.lastName}</au-slot></div></au-slot>`),
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 530..537
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 539..553
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 555..562
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 564..577
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 579..591
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 593..600
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 933..940
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 941..948
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 949..956
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 957..964
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 965..972
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 973..980
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 981..988
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 997..1004
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1005..1012
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1013..1020

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'projection works for [repeat]>au-slot[name="s1"]>au-slot[name="s2"],[repeat]>au-slot[name="s1"]>au-slot[name="s2"]',
              `<my-element><template au-slot="s2">\${$host.i*2}</template></my-element>`,
              [
                createMyElement(`
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 530..537
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 539..553
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 555..562
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 579..591
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 593..600
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 933..940
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 941..948
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 949..956
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 957..964
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 965..972
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 973..980
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 981..988
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 989..996
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 997..1004
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1005..1012
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1013..1020

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'works replacing au-slot[name=s1]>au-slot[name=s2][with]',
              `<my-element people.bind="people"> <div au-slot="s2">\${$host.item.firstName}</div> </my-element>`,
              [
                createMyElement(`<au-slot name="s1">\${people[0].firstName}<au-slot name="s2" with.bind="{item: people[0]}">\${item.lastName}</au-slot></au-slot>`),
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 530..537
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 539..553
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 555..562
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 564..577
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 579..591
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 593..600
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 933..940
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 941..948
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 949..956
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 957..964
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 965..972
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 973..980
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 981..988
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 989..996
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1005..1012
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1013..1020

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'works replacing au-slot[name=s1]>div[with]>au-slot[name=s2]',
              `<my-element people.bind="people"> <div au-slot="s2">\${$host.item.firstName}</div> </my-element>`,
              [
                createMyElement(`<au-slot name="s1">\${people[0].firstName}<div with.bind="{item: people[0]}"><au-slot name="s2">\${item.lastName}</au-slot></div></au-slot>`),
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 530..537
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 539..553
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 555..562
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 564..577
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 579..591
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 593..600
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 933..940
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 941..948
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 949..956
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 957..964
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 965..972
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 973..980
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 989..996
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 997..1004
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1005..1012
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1013..1020

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'works with a directly applied repeater - with projection',
              `<my-element><template au-slot>\${$host.i*2}</template></my-element>`,
              [
                createMyElement(`<au-slot repeat.for="i of 5">\${i}</au-slot>`),
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 539..553
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 555..562
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 564..577
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 579..591
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 593..600
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 933..940
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 941..948
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 949..956
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 957..964
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 965..972
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 973..980
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 981..988
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 989..996
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 997..1004
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1005..1012
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1013..1020

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'projection works for au-slot[repeat] with another repeat',
              `<my-element><template au-slot="s1"><template repeat.for="i of 3">\${i*2}</template></template></my-element>`,
              [
                createMyElement(`<au-slot name="s1" repeat.for="i of 2">\${i}</au-slot>`),
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 530..537
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 539..553
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 555..562
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 564..577
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 579..591
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 933..940
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 941..948
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 949..956
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 957..964
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 965..972
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 973..980
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 981..988
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 989..996
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 997..1004
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1005..1012
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1013..1020

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'works with "with" on parent',
              `<my-element people.bind="people"> <div au-slot>\${$host.item.lastName}</div> </my-element>`,
              [
                createMyElement(`<div with.bind="{item: people[0]}"><au-slot>\${item.firstName}</au-slot></div>`),
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 530..537
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 539..553
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 555..562
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 564..577
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 579..591
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 593..600
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 941..948
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 949..956
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 957..964
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 965..972
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 973..980
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 981..988
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 989..996
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 997..1004
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1005..1012
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1013..1020

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'works replacing div[with]>au-slot,div[with]au-slot',
              `<my-element people.bind="people"> <template au-slot>\${$host.item.lastName}</template> </my-element>`,
              [
                createMyElement(`<div with.bind="{item: people[0]}"><au-slot>\${item.firstName}</au-slot></div><div with.bind="{item: people[1]}"><au-slot>\${item.firstName}</au-slot></div>`),
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 530..537
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 539..553
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 555..562
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 564..577
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 579..591
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 593..600
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 933..940
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 941..948
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 949..956
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 957..964
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 965..972
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 973..980
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 981..988
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 989..996
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 997..1004
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1005..1012

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'projection works for [repeat]>au-slot,[repeat]>au-slot',
              `<my-element><template au-slot>\${$host.i*2}</template></my-element>`,
              [
                createMyElement(`
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 530..537
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 555..562
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 564..577
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 579..591
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 593..600
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 933..940
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 941..948
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 949..956
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 957..964
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 965..972
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 973..980
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 981..988
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 989..996
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 997..1004
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1005..1012
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1013..1020

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'works replacing div[with]>au-slot[name=s1]>au-slot[name=s2] - outer scope',
              `<let item.bind="people[1]"></let><my-element people.bind="people"> <div au-slot="s2">\${item.firstName}</div> </my-element>`,
              [
                createMyElement(`<div with.bind="{item: people[0]}"><au-slot name="s1">\${item.firstName}<au-slot name="s2">\${item.lastName}</au-slot></au-slot></div>`),
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 530..537
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 539..553
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 555..562
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 564..577
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 579..591
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 593..600
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 933..940
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 941..948
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 949..956
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 957..964
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 965..972
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 981..988
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 989..996
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 997..1004
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1005..1012
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1013..1020

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'works replacing au-slot[name=s1]>au-slot[name=s2][with] - outer scope',
              `<let item.bind="people[1]"></let><my-element people.bind="people"> <div au-slot="s2">\${item.firstName}</div> </my-element>`,
              [
                createMyElement(`<au-slot name="s1">\${people[0].firstName}<au-slot name="s2" with.bind="{item: people[0]}">\${item.lastName}</au-slot></au-slot>`),
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 530..537
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 539..553
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 555..562
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 564..577
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 579..591
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 593..600
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 933..940
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 941..948
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 949..956
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 957..964
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 965..972
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 973..980
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 981..988
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 989..996
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 997..1004
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1013..1020

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

      Refactorings

      Further Reading

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

            yield new TestData(
              'projection works for au-slot[repeat],au-slot[repeat]',
              `<my-element><template au-slot>\${$host.i*2}</template></my-element>`,
              [
                createMyElement(`<au-slot repeat.for="i of 5">\${i}</au-slot>|<au-slot repeat.for="i of 5">\${i + 2}</au-slot>`),
      Severity: Major
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 16 other locations - About 40 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 530..537
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 539..553
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 564..577
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 579..591
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 593..600
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 933..940
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 941..948
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 949..956
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 957..964
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 965..972
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 973..980
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 981..988
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 989..996
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 997..1004
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1005..1012
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1013..1020

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 48.

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

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

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

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

            yield new TestData(
              '[au-slot] -> <au-slot> -> [au-slot](ignored) -> <au-slot>(ignored)',
              `<my-element>
                <div au-slot="s1">
                  <au-slot name="does-not-matter">
      Severity: Minor
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 35 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1293..1307

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 47.

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

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

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

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

            yield new TestData(
              '[au-slot] -> <au-slot> -> [au-slot](ignored)',
              `<my-element>
                <div au-slot="s1">
                  <au-slot name="does-not-matter">
      Severity: Minor
      Found in packages/__tests__/src/3-runtime-html/au-slot.spec.tsx and 1 other location - About 35 mins to fix
      packages/__tests__/src/3-runtime-html/au-slot.spec.tsx on lines 1310..1327

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 47.

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

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

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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