aurelia/aurelia

View on GitHub
packages/__tests__/src/i18n/t/translation-integration.spec.ts

Summary

Maintainability
F
1 mo
Test Coverage

File translation-integration.spec.ts has 1490 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { I18N, I18nConfiguration, Signals } from '@aurelia/i18n';
import { Class, IContainer } from '@aurelia/kernel';
import { ISignaler, Aurelia, bindable, customElement, INode, IPlatform } from '@aurelia/runtime-html';
import { assert, PLATFORM, TestContext } from '@aurelia/testing';
import { createSpecFunction, TestExecutionContext, TestFunction } from '../../util.js';
Severity: Major
Found in packages/__tests__/src/i18n/t/translation-integration.spec.ts - About 3 days to fix

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

      describe('`t` binding-behavior works for', function () {
        {
          @customElement({ name: 'app', template: `<span>\${'simple.text' & t}</span>` })
          class App { }
          $it('key as string literal', function ({ host, en: translation }: I18nIntegrationTestContext<App>) {
    Severity: Major
    Found in packages/__tests__/src/i18n/t/translation-integration.spec.ts and 1 other location - About 3 days to fix
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1030..1076

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 600.

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

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

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

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

      describe('`t` value-converter works for', function () {
        {
          @customElement({ name: 'app', template: `<span>\${'simple.text' | t}</span>` })
          class App { }
          $it('key as string literal', function ({ host, en: translation }: I18nIntegrationTestContext<App>) {
    Severity: Major
    Found in packages/__tests__/src/i18n/t/translation-integration.spec.ts and 1 other location - About 3 days to fix
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1078..1125

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 600.

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

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

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

    See codeclimate-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: 'app', template: `<camel-ce component.ref="cm" t="[some-message]itemWithCount" t-params.bind="{count}">`
          })
          class App { public count: number = 0; public cm: CeWithCamelCaseBindable; }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 957..974

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 234.

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

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

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

    See codeclimate-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: 'app', template: `<custom-message component.ref="cm" t="[message]itemWithCount" t-params.bind="{count}">`
          })
          class App { public count: number = 0; public cm: CustomMessage; }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 998..1015

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 234.

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

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

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

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

    Refactorings

    Further Reading

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

        const cases = [
          { name: 'works for date object', input: new Date(2019, 7, 20), output: new Date('8/20/2019').toLocaleDateString('en') },
          { name: 'works for ISO 8601 date string', input: new Date(2019, 7, 20).toISOString(), output: new Date('8/20/2019').toLocaleDateString('en') },
          { name: 'works for integer', input: 0, output: new Date(0).toLocaleDateString('en') },
          { name: 'works for integer string', input: '0', output: new Date(0).toLocaleDateString('en') },
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1179..1189

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 228.

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

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

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

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

    Refactorings

    Further Reading

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

        const cases = [
          { name: 'works for date object', input: new Date(2019, 7, 20), output: new Date('8/20/2019').toLocaleDateString('en') },
          { name: 'works for ISO 8601 date string', input: new Date(2019, 7, 20).toISOString(), output: new Date('8/20/2019').toLocaleDateString('en') },
          { name: 'works for integer', input: 0, output: new Date(0).toLocaleDateString('en') },
          { name: 'works for integer string', input: '0', output: new Date(0).toLocaleDateString('en') },
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1128..1138

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 228.

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

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

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

        for (const value of [undefined, null, 'chaos', new Date(), true]) {
          @customElement(strictDef)
          class App { private readonly num: string | boolean | Date = value; }
          $it(`returns the value itself if the value is not a number STRICT binding, for example: ${value}`, function ({ host }: I18nIntegrationTestContext<App>) {
            assertTextContent(host, 'span', `${value ?? ''}`);
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1237..1250

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 220.

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

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

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

        for (const value of [undefined, null, 'chaos', new Date(), true]) {
          @customElement(strictDef)
          class App { private readonly num: string | boolean | Date = value; }
    
          $it(`returns the value itself if the value is not a number STRICT binding, for example: ${value}`, function ({ host }: I18nIntegrationTestContext<App>) {
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1299..1311

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 220.

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

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

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

    See codeclimate-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: 'app', template: `<span>\${ dt | rt }</span>` })
          class App {
            public dt: Date;
            public constructor() {
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1551..1568

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 208.

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

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

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

    See codeclimate-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: 'app', template: `<span>\${ dt & rt }</span>` })
          class App {
            public dt: Date;
            public constructor() {
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1437..1454

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 208.

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

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

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

    See codeclimate-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('when the key expression changed - property - custom element', function ({ ctx, host, en: translation, app }: I18nIntegrationTestContext<App>) {
            app.key = 'simple.attr';
            ctx.platform.domWriteQueue.flush();
            assertTextContent(host, `my-ce`, translation.simple.attr);
    
    
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 789..801

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 207.

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

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

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

    See codeclimate-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('when the key expression changed - property', function ({ ctx, host, en: translation, app }: I18nIntegrationTestContext<App>) {
            app.key = 'simple.attr';
            ctx.platform.domWriteQueue.flush();
            assertTextContent(host, `span`, translation.simple.attr);
    
    
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 816..828

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 207.

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

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

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

    See codeclimate-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: 'app', template: `<span>\${ dt & rt }</span>` })
          class App {
            private readonly dt: Date;
            public constructor() {
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1420..1436

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 179.

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

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

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

    See codeclimate-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: 'app', template: `<span>\${ dt | rt }</span>` })
          class App {
            private readonly dt: Date;
            public constructor() {
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1534..1550

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 179.

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

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

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

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

        {
          @customElement({
            name: 'app', template: `<span t.bind='keyExpr'>tac</span>`
          })
          class App {
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 686..702
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 703..718
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 719..735

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 176.

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

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

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

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

        {
          @customElement({
            name: 'app', template: `<span t.bind='keyExpr'>tac</span>`
          })
          class App {
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 670..685
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 686..702
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 703..718

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 176.

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

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

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

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

        {
          @customElement({
            name: 'app', template: `<span t.bind='keyExpr'>tac</span>`
          })
          class App {
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 670..685
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 703..718
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 719..735

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 176.

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

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

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

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

        {
          @customElement({
            name: 'app', template: `<span t.bind='keyExpr'>tac</span>`
          })
          class App {
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 670..685
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 686..702
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 719..735

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 176.

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

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

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

    See codeclimate-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: 'app', template: `<span t.bind='obj.key'></span>`
          })
          class App {
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 739..751

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 165.

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

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

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

    See codeclimate-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: 'app', template: `<span t='\${obj.key}'></span>`
          })
          class App {
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 769..781

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 165.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({ name: 'app', template: `<span>\${ dt | rt : undefined : 'de' }</span>` })
          class App {
            private readonly dt: Date;
            public constructor() {
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1380..1392
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1406..1418
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1508..1520
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1521..1533

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 142.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({ name: 'app', template: `<span>\${ dt & rt : { style: 'short' } : 'de' }</span>` })
          class App {
            private readonly dt: Date;
            public constructor() {
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1380..1392
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1393..1405
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1406..1418
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1508..1520

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 142.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({ name: 'app', template: `<span>\${ dt | rt : { style: 'short' } : 'de' }</span>` })
          class App {
            private readonly dt: Date;
            public constructor() {
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1380..1392
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1393..1405
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1508..1520
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1521..1533

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 142.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({ name: 'app', template: `<span>\${ dt | rt }</span>` })
          class App {
            private readonly dt: Date;
            public constructor() {
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1393..1405
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1406..1418
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1508..1520
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1521..1533

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 142.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({ name: 'app', template: `<span>\${ dt & rt : undefined : 'de' }</span>` })
          class App {
            private readonly dt: Date;
            public constructor() {
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1380..1392
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1393..1405
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1406..1418
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1521..1533

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 142.

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

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

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

    See codeclimate-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, container }: I18nIntegrationTestContext<App>) {
              await platform.taskQueue.queueTask(delta => {
                container.get<ISignaler>(ISignaler).dispatchSignal(Signals.RT_SIGNAL);
                platform.domWriteQueue.flush();
                assertTextContent(host, 'span', `${Math.round((delta + offset) / 1000)} seconds ago`);
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1466..1472

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 115.

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

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

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

    See codeclimate-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 ({ platform, host, container }) {
              await platform.taskQueue.queueTask(delta => {
                container.get<ISignaler>(ISignaler).dispatchSignal(Signals.RT_SIGNAL);
                platform.domWriteQueue.flush();
                assertTextContent(host, 'span', `${Math.round((delta + offset) / 1000)} seconds ago`);
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1580..1586

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 115.

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

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

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

    See codeclimate-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: 'app',
          template: `<p t.bind="undef" id="undefined">
            Undefined value
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 174..195

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 110.

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

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

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

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

    Refactorings

    Further Reading

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

      {
    
        @customElement({
          name: 'app',
          template: `<p t.bind="undef" id="undefined" t-params.bind="{defaultValue:'foo'}">
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 154..173

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 110.

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

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

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

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

    Refactorings

    Further Reading

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

      {
        @customElement({ name: 'app', template: `<span t='[title]simple.attr;[title]simple.text'></span>` })
        class App { }
        $it('value of last key takes effect if multiple keys target same attribute - t=\'[title]simple.attr;[title]simple.text\'', function ({ host, en: translation }: I18nIntegrationTestContext<App>) {
          assertTextContent(host, `span[title='${translation.simple.text}']`, '');
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 413..419

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 103.

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

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

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

    See codeclimate-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: 'app', template: `<span t='[title]simple.attr'></span>` })
        class App { }
        $it('can translate attributes - t=\'[title]simple.attr\'', function ({ host, en: translation }: I18nIntegrationTestContext<App>) {
          assertTextContent(host, `span[title='${translation.simple.attr}']`, '');
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 421..427

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 103.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({
            name: 'app', template: `<span t='[prepend]preHtml;[append]postHtml;mid'></span>`
          })
          class App { }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 530..538
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 540..548
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 550..558
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 578..586
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 587..595
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 596..604
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 623..631
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 641..649

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 102.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({
            name: 'app', template: `<span t='[prepend]preHtml;[append]postHtml;[html]midHtml'></span>`
          })
          class App { }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 530..538
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 540..548
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 550..558
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 578..586
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 587..595
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 596..604
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 623..631
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 632..640

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 102.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({
            name: 'app', template: `<span t='[append]postHtml;[html]midHtml'></span>`
          })
          class App { }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 530..538
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 540..548
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 550..558
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 578..586
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 587..595
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 623..631
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 632..640
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 641..649

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 102.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({
            name: 'app', template: `<span t='[prepend]preHtml;[html]midHtml'></span>`
          })
          class App { }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 530..538
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 540..548
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 578..586
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 587..595
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 596..604
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 623..631
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 632..640
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 641..649

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 102.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({
            name: 'app', template: `<span t='[append]postHtml;[html]mid'></span>`
          })
          class App { }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 530..538
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 540..548
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 550..558
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 578..586
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 596..604
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 623..631
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 632..640
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 641..649

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 102.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({
            name: 'app', template: `<span t='[prepend]pre;[append]post;[html]midHtml'></span>`
          })
          class App { }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 530..538
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 540..548
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 550..558
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 578..586
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 587..595
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 596..604
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 632..640
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 641..649

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 102.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({
            name: 'app', template: `<span t='[prepend]pre;[html]midHtml'></span>`
          })
          class App { }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 540..548
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 550..558
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 578..586
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 587..595
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 596..604
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 623..631
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 632..640
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 641..649

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 102.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({
            name: 'app', template: `<span t='[append]post;[html]midHtml'></span>`
          })
          class App { }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 530..538
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 540..548
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 550..558
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 587..595
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 596..604
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 623..631
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 632..640
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 641..649

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 102.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({
            name: 'app', template: `<span t='[prepend]preHtml;[html]mid'></span>`
          })
          class App { }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 530..538
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 550..558
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 578..586
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 587..595
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 596..604
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 623..631
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 632..640
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 641..649

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 102.

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

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

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

    See codeclimate-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: 'app', template: `<foo-bar status="delivered" date="1971-12-25"><div au-slot t="status" t-params.bind="{context: status, date: date}"></div></foo-bar>` })
          class App {
            private readonly status: string = 'dispatched';
            private readonly date: string = '1972-12-26';
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1628..1637

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 99.

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

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

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

    See codeclimate-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: 'app', template: `<foo-bar status="delivered" date="1971-12-25"><div au-slot t="status" t-params.bind="{context: status, date: $host.date}"></div></foo-bar>` })
          class App {
            private readonly status: string = 'dispatched';
            private readonly date: string = '1972-12-26';
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1618..1627

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 99.

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

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

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

    See codeclimate-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: 'app', template: `<span>\${ dt | df : {year:'2-digit', month:'2-digit', day:'2-digit'} : 'de' }</span>` })
          class App { private readonly dt: Date = new Date(2019, 7, 20); }
          $it('respects provided locale and formatting options', function ({ host }: I18nIntegrationTestContext<App>) {
            assertTextContent(host, 'span', '20.08.19');
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1204..1210

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 98.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({ name: 'app', template: `<span>\${ dt & df : {year:'2-digit', month:'2-digit', day:'2-digit'} : 'de' }</span>` })
          class App { private readonly dt: Date = new Date(2019, 7, 20); }
          $it('respects provided locale and formatting options', function ({ host }: I18nIntegrationTestContext<App>) {
            assertTextContent(host, 'span', '20.08.19');
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1153..1159

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 98.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({ name: 'app', template: `<span>\${ num | nf : { style: 'currency', currency: 'EUR' } : 'de' }</span>` })
          class App { private readonly num: number = 123456789.12; }
          $it('formats a given number as per given locale and formatting options', function ({ host }: I18nIntegrationTestContext<App>) {
            assertTextContent(host, 'span', '123.456.789,12\u00A0€');
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1272..1278
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1279..1285
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1312..1318
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1319..1325
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1326..1332
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1333..1339

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 90.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({ name: 'app', template: `<span>\${ num & nf : { style: 'currency', currency: 'EUR' } : 'de' }</span>` })
          class App { private readonly num: number = 123456789.12; }
          $it('formats a given number as per given locale and formating options', function ({ host }: I18nIntegrationTestContext<App>) {
            assertTextContent(host, 'span', '123.456.789,12\u00A0€');
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1272..1278
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1279..1285
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1286..1292
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1312..1318
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1319..1325
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1326..1332

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 90.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({ name: 'app', template: `<span>\${ num | nf : { style: 'currency', currency: 'EUR' } }</span>` })
          class App { private readonly num: number = 123456789.12; }
          $it('formats a given number as per given formatting options', function ({ host }: I18nIntegrationTestContext<App>) {
            assertTextContent(host, 'span', '€123,456,789.12');
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1279..1285
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1286..1292
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1312..1318
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1319..1325
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1326..1332
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1333..1339

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 90.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({ name: 'app', template: `<span>\${ num & nf : { style: 'currency', currency: 'EUR' } }</span>` })
          class App { private readonly num: number = 123456789.12; }
          $it('formats a given number as per given formatting options', function ({ host }: I18nIntegrationTestContext<App>) {
            assertTextContent(host, 'span', '€123,456,789.12');
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1272..1278
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1279..1285
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1286..1292
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1312..1318
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1326..1332
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1333..1339

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 90.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({ name: 'app', template: `<span>\${ num & nf }</span>` })
          class App { private readonly num: number = 123456789.12; }
          $it('formats number by default as per current locale and default formatting options', function ({ host }: I18nIntegrationTestContext<App>) {
            assertTextContent(host, 'span', '123,456,789.12');
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1272..1278
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1279..1285
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1286..1292
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1319..1325
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1326..1332
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1333..1339

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 90.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({ name: 'app', template: `<span>\${ num | nf : undefined : 'de' }</span>` })
          class App { private readonly num: number = 123456789.12; }
          $it('formats a given number as per given locale', function ({ host }: I18nIntegrationTestContext<App>) {
            assertTextContent(host, 'span', '123.456.789,12');
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1272..1278
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1286..1292
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1312..1318
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1319..1325
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1326..1332
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1333..1339

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 90.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({ name: 'app', template: `<span>\${ num & nf : undefined : 'de' }</span>` })
          class App { private readonly num: number = 123456789.12; }
          $it('formats a given number as per given locale', function ({ host }: I18nIntegrationTestContext<App>) {
            assertTextContent(host, 'span', '123.456.789,12');
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1272..1278
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1279..1285
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1286..1292
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1312..1318
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1319..1325
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1333..1339

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 90.

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

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

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

          $it('works for change of source value', function ({ host, platform, app }: I18nIntegrationTestContext<App>) {
            app.dt = new Date(2019, 7, 21);
            platform.domWriteQueue.flush();
            assertTextContent(host, 'span', '8/21/2019');
          }, { component: App });
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1225..1229

    Duplicated Code

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

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

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

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

          $it('works for change of source value', function ({ host, platform, app }: I18nIntegrationTestContext<App>) {
            app.dt = new Date(2019, 7, 21);
            platform.domWriteQueue.flush();
            assertTextContent(host, 'span', '8/21/2019');
          }, { component: App });
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1170..1174

    Duplicated Code

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

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

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

        @customElement({
          name: 'app',
          template: `<p t.bind="undef" id="undefined">
          Undefined value
        </p>
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 229..246

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 84.

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

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

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

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

    Refactorings

    Further Reading

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

        @customElement({
          name: 'app',
          template: `<p t.bind="undef" id="undefined" t-params.bind="{defaultValue:'foo'}">
            Undefined value
          </p>
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 197..214

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 84.

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

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

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

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

    Refactorings

    Further Reading

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

          $it('works for change of source value', function ({ host, platform, app }: I18nIntegrationTestContext<App>) {
            app.num = 123456789.21;
            platform.domWriteQueue.flush();
    
            assertTextContent(host, 'span', '123,456,789.21');
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1354..1359

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 83.

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

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

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

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

    Refactorings

    Further Reading

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

          $it('works for change of source value', function ({ host, app, platform }: I18nIntegrationTestContext<App>) {
            app.num = 123456789.21;
            platform.domWriteQueue.flush();
    
            assertTextContent(host, 'span', '123,456,789.21');
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1265..1270

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 83.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({
            name: 'app', template: `<span t='[prepend]pre;mid'></span>`
          })
          class App { }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 511..519
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 559..567
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 568..576
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 605..613
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 614..622
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1611..1617

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 81.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({
            name: 'app', template: `<span t='[prepend]pre'>tac</span>`
          })
          class App { }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 520..528
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 559..567
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 568..576
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 605..613
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 614..622
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1611..1617

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 81.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({
            name: 'app', template: `<span t='[append]post;mid'></span>`
          })
          class App { }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 511..519
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 520..528
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 559..567
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 605..613
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 614..622
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1611..1617

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 81.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({
            name: 'app', template: `<span t='[prepend]pre;[append]post'>tac</span>`
          })
          class App { }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 511..519
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 520..528
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 559..567
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 568..576
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 614..622
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1611..1617

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 81.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({ name: 'app', template: `<foo-bar status="delivered" date="1971-12-25"></foo-bar>` })
          class App { }
          $it('w/o projection', function ({ host }: I18nIntegrationTestContext<App>) {
            assertTextContent(host, 'span', 'delivered on 1971-12-25');
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 511..519
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 520..528
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 559..567
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 568..576
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 605..613
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 614..622

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 81.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({
            name: 'app', template: `<span t='[append]post'>tac</span>`
          })
          class App { }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 511..519
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 520..528
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 568..576
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 605..613
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 614..622
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1611..1617

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 81.

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

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

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

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

    Refactorings

    Further Reading

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

        {
          @customElement({
            name: 'app', template: `<span t='[prepend]pre;[append]post;mid'></span>`
          })
          class App { }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 511..519
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 520..528
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 559..567
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 568..576
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 605..613
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1611..1617

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 81.

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

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

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

    See codeclimate-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(name, function ({ host }: I18nIntegrationTestContext<App1>) {
            assertTextContent(host, 'span', (output ?? '').toString());
          }, { component: App1 });
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1149..1151

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 59.

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

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

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

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

    Refactorings

    Further Reading

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

          $it(name, function ({ host }: I18nIntegrationTestContext<App1>) {
            assertTextContent(host, 'span', (output ?? '').toString());
          }, { component: App1 });
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1200..1202

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 59.

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

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

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

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

    Refactorings

    Further Reading

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

          @customElement({ name: 'app', template: `<span>\${ dt & rt }</span>` })
          class App {
            public dt: Date = new Date(Date.now() - offset);
          }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1460..1463

    Duplicated Code

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

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

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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: 'app', template: `<span>\${ dt | rt }</span>` })
          class App {
            public dt: Date = new Date(Date.now() - offset);
          }
    packages/__tests__/src/i18n/t/translation-integration.spec.ts on lines 1574..1577

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 58.

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

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

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

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

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status