aurelia/aurelia

View on GitHub

Showing 5,354 of 5,354 total issues

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

  for (let i = 0, ii = $1vpKeys.length; i < ii; ++i) {
    const key11 = $1vpKeys[i];
    const value11 = $1vp[key11];

    it(`root1 can load ${key11}`, async function () {
Severity: Major
Found in packages/__tests__/src/router-lite/smoke-tests.spec.ts and 1 other location - About 2 days to fix
packages/__tests__/src/router-lite/smoke-tests.spec.ts on lines 605..646

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 399.

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

File current-route.spec.ts has 914 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable @typescript-eslint/consistent-type-assertions */
import { resolve } from '@aurelia/kernel';
import { ICurrentRoute, IRouteViewModel, IRouter, ParameterInformation, Params, RouteConfig, route } from '@aurelia/router-lite';
import { customElement } from '@aurelia/runtime-html';
import { assert } from '@aurelia/testing';
Severity: Major
Found in packages/__tests__/src/router-lite/current-route.spec.ts - About 2 days to fix

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

      async function $setup(config?: IRouterOptions, dependencies: any[] = [], routes: IRoute[] = [], stateSpy: NavigationStateCallback = void 0) {
        const ctx = TestContext.create();
    
        const { container, platform } = ctx;
    
    
    Severity: Major
    Found in packages/__tests__/src/router/router.redirect.spec.ts and 6 other locations - About 2 days to fix
    packages/__tests__/src/router/router.fast-switch.spec.ts on lines 41..83
    packages/__tests__/src/router/router.lifecycle-hooks.spec.ts on lines 41..83
    packages/__tests__/src/router/router.link-click-navigation.spec.ts on lines 41..78
    packages/__tests__/src/router/router.title.spec.ts on lines 41..78
    packages/__tests__/src/router/router.viewport-scope.spec.ts on lines 41..78
    packages/__tests__/src/router/router.with-configuration.spec.ts on lines 41..78

    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 387.

    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

      async function $setup(
        config?: IRouterOptions,
        dependencies: any[] = [],
        routes: IRoute[] = [],
        stateSpy: NavigationStateCallback = void 0,
    Severity: Major
    Found in packages/__tests__/src/router/router.fast-switch.spec.ts and 6 other locations - About 2 days to fix
    packages/__tests__/src/router/router.lifecycle-hooks.spec.ts on lines 41..83
    packages/__tests__/src/router/router.link-click-navigation.spec.ts on lines 41..78
    packages/__tests__/src/router/router.redirect.spec.ts on lines 41..78
    packages/__tests__/src/router/router.title.spec.ts on lines 41..78
    packages/__tests__/src/router/router.viewport-scope.spec.ts on lines 41..78
    packages/__tests__/src/router/router.with-configuration.spec.ts on lines 41..78

    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 387.

    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

      async function $setup(config?: IRouterOptions, dependencies: any[] = [], routes: IRoute[] = [], stateSpy: NavigationStateCallback = void 0) {
        const ctx = TestContext.create();
    
        const { container, platform } = ctx;
    
    
    Severity: Major
    Found in packages/__tests__/src/router/router.title.spec.ts and 6 other locations - About 2 days to fix
    packages/__tests__/src/router/router.fast-switch.spec.ts on lines 41..83
    packages/__tests__/src/router/router.lifecycle-hooks.spec.ts on lines 41..83
    packages/__tests__/src/router/router.link-click-navigation.spec.ts on lines 41..78
    packages/__tests__/src/router/router.redirect.spec.ts on lines 41..78
    packages/__tests__/src/router/router.viewport-scope.spec.ts on lines 41..78
    packages/__tests__/src/router/router.with-configuration.spec.ts on lines 41..78

    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 387.

    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

      async function $setup(
        config?: IRouterOptions,
        dependencies: any[] = [],
        routes: IRoute[] = [],
        stateSpy: NavigationStateSpy = void 0,
    Severity: Major
    Found in packages/__tests__/src/router/router.lifecycle-hooks.spec.ts and 6 other locations - About 2 days to fix
    packages/__tests__/src/router/router.fast-switch.spec.ts on lines 41..83
    packages/__tests__/src/router/router.link-click-navigation.spec.ts on lines 41..78
    packages/__tests__/src/router/router.redirect.spec.ts on lines 41..78
    packages/__tests__/src/router/router.title.spec.ts on lines 41..78
    packages/__tests__/src/router/router.viewport-scope.spec.ts on lines 41..78
    packages/__tests__/src/router/router.with-configuration.spec.ts on lines 41..78

    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 387.

    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

      async function $setup(config?: IRouterOptions, dependencies: any[] = [], routes: IRoute[] = [], stateSpy: NavigationStateCallback = void 0) {
        const ctx = TestContext.create();
    
        const { container, platform } = ctx;
    
    
    packages/__tests__/src/router/router.fast-switch.spec.ts on lines 41..83
    packages/__tests__/src/router/router.lifecycle-hooks.spec.ts on lines 41..83
    packages/__tests__/src/router/router.redirect.spec.ts on lines 41..78
    packages/__tests__/src/router/router.title.spec.ts on lines 41..78
    packages/__tests__/src/router/router.viewport-scope.spec.ts on lines 41..78
    packages/__tests__/src/router/router.with-configuration.spec.ts on lines 41..78

    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 387.

    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

      async function $setup(config?: IRouterOptions, dependencies: any[] = [], routes: IRoute[] = [], stateSpy: NavigationStateCallback = void 0) {
        const ctx = TestContext.create();
    
        const { container, platform } = ctx;
    
    
    Severity: Major
    Found in packages/__tests__/src/router/router.viewport-scope.spec.ts and 6 other locations - About 2 days to fix
    packages/__tests__/src/router/router.fast-switch.spec.ts on lines 41..83
    packages/__tests__/src/router/router.lifecycle-hooks.spec.ts on lines 41..83
    packages/__tests__/src/router/router.link-click-navigation.spec.ts on lines 41..78
    packages/__tests__/src/router/router.redirect.spec.ts on lines 41..78
    packages/__tests__/src/router/router.title.spec.ts on lines 41..78
    packages/__tests__/src/router/router.with-configuration.spec.ts on lines 41..78

    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 387.

    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

      async function $setup(config?: IRouterOptions, dependencies: any[] = [], routes: IRoute[] = [], stateSpy: NavigationStateCallback = void 0) {
        const ctx = TestContext.create();
    
        const { container, platform } = ctx;
    
    
    packages/__tests__/src/router/router.fast-switch.spec.ts on lines 41..83
    packages/__tests__/src/router/router.lifecycle-hooks.spec.ts on lines 41..83
    packages/__tests__/src/router/router.link-click-navigation.spec.ts on lines 41..78
    packages/__tests__/src/router/router.redirect.spec.ts on lines 41..78
    packages/__tests__/src/router/router.title.spec.ts on lines 41..78
    packages/__tests__/src/router/router.viewport-scope.spec.ts on lines 41..78

    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 387.

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

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

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

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

    Refactorings

    Further Reading

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

    class Notifier {
      public readonly p: IPlatform;
      public readonly entryHistory: string[] = [];
      public readonly fullHistory: string[] = [];
    
    
    packages/__tests__/src/router-lite/hook-tests.spec.ts on lines 189..221

    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 379.

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

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

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

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

    Refactorings

    Further Reading

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

    class Notifier {
      public readonly p: IPlatform;
      public readonly entryHistory: string[] = [];
      public readonly fullHistory: string[] = [];
    
    
    Severity: Major
    Found in packages/__tests__/src/router-lite/hook-tests.spec.ts and 1 other location - About 2 days to fix
    packages/__tests__/src/3-runtime-html/controller.hook-timings.integration.spec.ts on lines 1743..1775

    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 379.

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

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

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

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

    Refactorings

    Further Reading

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

          yield new SiblingHookTestData(
            ticks,
            root,
            scopes,
            assertStartLog,
    Severity: Major
    Found in packages/__tests__/src/router-lite/lifecycle-hooks.spec.ts and 1 other location - About 2 days to fix
    packages/__tests__/src/router-lite/lifecycle-hooks.spec.ts on lines 5477..5709

    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 377.

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

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

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

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

    Refactorings

    Further Reading

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

          yield new SiblingHookTestData(
            ticks,
            root,
            scopes,
            assertStartLog,
    Severity: Major
    Found in packages/__tests__/src/router-lite/lifecycle-hooks.spec.ts and 1 other location - About 2 days to fix
    packages/__tests__/src/router-lite/lifecycle-hooks.spec.ts on lines 4503..4735

    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 377.

    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

    File repeat.keyed.array.spec.ts has 875 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable @typescript-eslint/no-unused-vars */
    import { batch } from '@aurelia/runtime';
    import { Aurelia, CustomElement, ICustomElementViewModel } from '@aurelia/runtime-html';
    import { TestContext, assert } from "@aurelia/testing";
    
    
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/repeat.keyed.array.spec.ts - About 2 days to fix

      File di.get.spec.ts has 867 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import { all, Constructable, DI, factory, IContainer, resolve, IResolvedFactory, lazy, newInstanceForScope, newInstanceOf, optional, Registration, singleton, transient } from '@aurelia/kernel';
      import { assert } from '@aurelia/testing';
      
      describe('1-kernel/di.get.spec.ts', function () {
        let container: IContainer;
      Severity: Major
      Found in packages/__tests__/src/1-kernel/di.get.spec.ts - About 2 days to fix

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

          public dispose(): void {
            this.binding.dispose();
            this.bound.dispose();
            this.attaching.dispose();
            this.attached.dispose();
        packages/__tests__/src/router-lite/_shared/hook-invocation-tracker.ts on lines 133..162

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 371.

        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

          public dispose(): void {
            this.binding.dispose();
            this.bound.dispose();
            this.attaching.dispose();
            this.attached.dispose();
        packages/__tests__/src/router/_shared/hook-invocation-tracker.ts on lines 137..166

        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 371.

        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('supports routing instruction with parenthesized parameters', async function () {
            @route('c1/:id1/:id2?')
            @customElement({ name: 'c-1', template: 'c1 ${id1} ${id2}' })
            class C1 implements IRouteViewModel {
              private id1: string;
        Severity: Major
        Found in packages/__tests__/src/router-lite/resources/href.spec.ts and 1 other location - About 2 days to fix
        packages/__tests__/src/router-lite/resources/load.spec.ts on lines 1105..1135

        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 370.

        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('supports routing instruction with parenthesized parameters', async function () {
            @route('c1/:id1/:id2?')
            @customElement({ name: 'c-1', template: 'c1 ${id1} ${id2}' })
            class C1 implements IRouteViewModel {
              private id1: string;
        Severity: Major
        Found in packages/__tests__/src/router-lite/resources/load.spec.ts and 1 other location - About 2 days to fix
        packages/__tests__/src/router-lite/resources/href.spec.ts on lines 290..320

        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 370.

        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

        File custom-attributes.spec.ts has 859 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import { DI, IContainer, Registration, resolve } from '@aurelia/kernel';
        import {
          CustomAttribute,
          IAurelia,
          IHydratedComponentController,
        Severity: Major
        Found in packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts - About 2 days to fix
          Severity
          Category
          Status
          Source
          Language