aurelia/aurelia

View on GitHub
packages/__tests__/src/router-lite/config-tests.spec.ts

Summary

Maintainability
F
1 wk
Test Coverage

File config-tests.spec.ts has 444 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Aurelia, CustomElement, customElement, ICustomElementController } from '@aurelia/runtime-html';
import { IRouteConfig, IRouter, IRouteViewModel, route, Route, RouteConfig, RouteNode, RouterConfiguration } from '@aurelia/router-lite';
import { assert, TestContext } from '@aurelia/testing';

import { IHookInvocationAggregator, IHIAConfig, HookName } from './_shared/hook-invocation-tracker.js';
Severity: Minor
Found in packages/__tests__/src/router-lite/config-tests.spec.ts - About 6 hrs to fix

    Function runTest has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

              function runTest(spec: ISpec) {
                const { t1: [t1, t1c], t2: [t2, t2c], t3: [t3, t3c], t4: [t4, t4c] } = spec;
                spec.configure();
                it(`'${t1}' -> '${t2}' -> '${t3}' -> '${t4}'`, async function () {
                  const { router, hia, tearDown } = await createFixture(Root2, A, getDefaultHIAConfig);
    Severity: Minor
    Found in packages/__tests__/src/router-lite/config-tests.spec.ts - About 1 hr to fix

      Function interleave has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      export function* interleave(
        ...generators: Generator<string, void>[]
      ): Generator<string, void> {
        while (generators.length > 0) {
          for (let i = 0, ii = generators.length; i < ii; ++i) {
      Severity: Minor
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

        it(`works with single multi segment static path with single child`, async function () {
          @customElement({ name: 'b01', template: null })
          class B01 extends SimpleActivityTrackingVMBase {}
      
          @route({ routes: [{ path: 'b', component: B01 }] })
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 2 other locations - About 1 day to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 375..392
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 394..411

      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 3 locations. Consider refactoring.
      Open

        it(`works with single multi segment static path with single multi segment static child`, async function () {
          @customElement({ name: 'b01', template: null })
          class B01 extends SimpleActivityTrackingVMBase {}
      
          @route({ routes: [{ path: 'b/x', component: B01 }] })
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 2 other locations - About 1 day to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 356..373
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 394..411

      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 3 locations. Consider refactoring.
      Open

        it(`works with single static path with single multi segment static child`, async function () {
          @customElement({ name: 'b01', template: null })
          class B01 extends SimpleActivityTrackingVMBase {}
      
          @route({ routes: [{ path: 'b/x', component: B01 }] })
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 2 other locations - About 1 day to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 356..373
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 375..392

      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

      function getAllAsyncSpecs(count: number): HookSpecs {
        return HookSpecs.create({
          binding: hookSpecsMap.binding.async(count),
          bound: hookSpecsMap.bound.async(count),
          attaching: hookSpecsMap.attaching.async(count),
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 1 other location - About 1 day to fix
      packages/__tests__/src/router/config-tests.spec.ts on lines 768..783

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

      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 componentSpecs: IComponentSpec[] = [
            {
              kind: 'all-sync',
              hookSpecs: HookSpecs.create({
                binding: hookSpecsMap.binding.sync,
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 1 other location - About 7 hrs to fix
      packages/__tests__/src/router/config-tests.spec.ts on lines 133..155

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

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

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

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

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

      Refactorings

      Further Reading

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

        it(`works with single empty static path redirect`, async function () {
          @customElement({ name: 'a01', template: null })
          class A01 extends SimpleActivityTrackingVMBase {}
      
          @route({ routes: [{ path: '', redirectTo: 'a' }, { path: 'a', component: A01 }] })
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 1 other location - About 6 hrs to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 428..441

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

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

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

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

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

      Refactorings

      Further Reading

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

        it(`works with single static path redirect`, async function () {
          @customElement({ name: 'a01', template: null })
          class A01 extends SimpleActivityTrackingVMBase {}
      
          @route({ routes: [{ path: 'x', redirectTo: 'a' }, { path: 'a', component: A01 }] })
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 1 other location - About 6 hrs to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 413..426

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

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

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

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

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

      Refactorings

      Further Reading

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

        it(`works with single multi segment static path`, async function () {
          @customElement({ name: 'a01', template: null })
          class A01 extends SimpleActivityTrackingVMBase {}
      
          @route({ routes: [{ path: 'a/x', component: A01 }] })
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 1 other location - About 6 hrs to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 341..354

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

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

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

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

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

      Refactorings

      Further Reading

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

        it(`works with single multi segment dynamic path`, async function () {
          @customElement({ name: 'a01', template: null })
          class A01 extends SimpleActivityTrackingVMBase {}
      
          @route({ routes: [{ path: 'a/:x', component: A01 }] })
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 1 other location - About 6 hrs to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 326..339

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

      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

      export abstract class SimpleActivityTrackingVMBase {
        public readonly $controller!: ICustomElementController;
      
        public readonly tracker: IActivityTracker = resolve(IActivityTracker);
      
      
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 1 other location - About 3 hrs to fix
      packages/__tests__/src/router/config-tests.spec.ts on lines 95..107

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

      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 3 locations. Consider refactoring.
      Open

      function vp(count: number): string {
        if (count === 1) {
          return `<au-viewport></au-viewport>`;
        }
        let template = '';
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 2 other locations - About 2 hrs to fix
      packages/__tests__/src/router-lite/hook-tests.spec.ts on lines 393..402
      packages/__tests__/src/router/config-tests.spec.ts on lines 11..20

      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

                interface ISpec {
                  t1: [string, string];
                  t2: [string, string];
                  t3: [string, string];
                  t4: [string, string];
      Severity: Minor
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 1 other location - About 55 mins to fix
      packages/__tests__/src/router/config-tests.spec.ts on lines 225..231

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 54.

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

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

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

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

      Refactorings

      Further Reading

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

            @customElement({ name: 'a11', template: vp(1) })
            class A11 extends TestRouteViewModelBase {
              public constructor() { super(resolve(IHookInvocationAggregator), hookSpecs); }
            }
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 14 other locations - About 50 mins to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 140..143
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 144..147
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 148..151
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 155..158
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 159..162
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 163..166
      packages/__tests__/src/router/config-tests.spec.ts on lines 179..182
      packages/__tests__/src/router/config-tests.spec.ts on lines 183..186
      packages/__tests__/src/router/config-tests.spec.ts on lines 187..190
      packages/__tests__/src/router/config-tests.spec.ts on lines 191..194
      packages/__tests__/src/router/config-tests.spec.ts on lines 195..198
      packages/__tests__/src/router/config-tests.spec.ts on lines 202..205
      packages/__tests__/src/router/config-tests.spec.ts on lines 206..209
      packages/__tests__/src/router/config-tests.spec.ts on lines 210..213

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 51.

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

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

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

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

      Refactorings

      Further Reading

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

            @customElement({ name: 'a22', template: vp(2) })
            class A22 extends TestRouteViewModelBase {
              public constructor() { super(resolve(IHookInvocationAggregator), hookSpecs); }
            }
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 14 other locations - About 50 mins to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 136..139
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 140..143
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 144..147
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 148..151
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 155..158
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 159..162
      packages/__tests__/src/router/config-tests.spec.ts on lines 179..182
      packages/__tests__/src/router/config-tests.spec.ts on lines 183..186
      packages/__tests__/src/router/config-tests.spec.ts on lines 187..190
      packages/__tests__/src/router/config-tests.spec.ts on lines 191..194
      packages/__tests__/src/router/config-tests.spec.ts on lines 195..198
      packages/__tests__/src/router/config-tests.spec.ts on lines 202..205
      packages/__tests__/src/router/config-tests.spec.ts on lines 206..209
      packages/__tests__/src/router/config-tests.spec.ts on lines 210..213

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 51.

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

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

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

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

      Refactorings

      Further Reading

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

            @customElement({ name: 'a13', template: vp(1) })
            class A13 extends TestRouteViewModelBase {
              public constructor() { super(resolve(IHookInvocationAggregator), hookSpecs); }
            }
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 14 other locations - About 50 mins to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 136..139
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 140..143
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 148..151
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 155..158
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 159..162
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 163..166
      packages/__tests__/src/router/config-tests.spec.ts on lines 179..182
      packages/__tests__/src/router/config-tests.spec.ts on lines 183..186
      packages/__tests__/src/router/config-tests.spec.ts on lines 187..190
      packages/__tests__/src/router/config-tests.spec.ts on lines 191..194
      packages/__tests__/src/router/config-tests.spec.ts on lines 195..198
      packages/__tests__/src/router/config-tests.spec.ts on lines 202..205
      packages/__tests__/src/router/config-tests.spec.ts on lines 206..209
      packages/__tests__/src/router/config-tests.spec.ts on lines 210..213

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 51.

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

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

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

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

      Refactorings

      Further Reading

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

            @customElement({ name: 'a14', template: vp(1) })
            class A14 extends TestRouteViewModelBase {
              public constructor() { super(resolve(IHookInvocationAggregator), hookSpecs); }
            }
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 14 other locations - About 50 mins to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 136..139
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 140..143
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 144..147
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 155..158
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 159..162
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 163..166
      packages/__tests__/src/router/config-tests.spec.ts on lines 179..182
      packages/__tests__/src/router/config-tests.spec.ts on lines 183..186
      packages/__tests__/src/router/config-tests.spec.ts on lines 187..190
      packages/__tests__/src/router/config-tests.spec.ts on lines 191..194
      packages/__tests__/src/router/config-tests.spec.ts on lines 195..198
      packages/__tests__/src/router/config-tests.spec.ts on lines 202..205
      packages/__tests__/src/router/config-tests.spec.ts on lines 206..209
      packages/__tests__/src/router/config-tests.spec.ts on lines 210..213

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 51.

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

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

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

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

      Refactorings

      Further Reading

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

            @customElement({ name: 'a12', template: vp(1) })
            class A12 extends TestRouteViewModelBase {
              public constructor() { super(resolve(IHookInvocationAggregator), hookSpecs); }
            }
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 14 other locations - About 50 mins to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 136..139
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 144..147
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 148..151
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 155..158
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 159..162
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 163..166
      packages/__tests__/src/router/config-tests.spec.ts on lines 179..182
      packages/__tests__/src/router/config-tests.spec.ts on lines 183..186
      packages/__tests__/src/router/config-tests.spec.ts on lines 187..190
      packages/__tests__/src/router/config-tests.spec.ts on lines 191..194
      packages/__tests__/src/router/config-tests.spec.ts on lines 195..198
      packages/__tests__/src/router/config-tests.spec.ts on lines 202..205
      packages/__tests__/src/router/config-tests.spec.ts on lines 206..209
      packages/__tests__/src/router/config-tests.spec.ts on lines 210..213

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 51.

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

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

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

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

      Refactorings

      Further Reading

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

            @customElement({ name: 'root2', template: vp(2) })
            class Root2 extends TestRouteViewModelBase {
              public constructor() { super(resolve(IHookInvocationAggregator), hookSpecs); }
            }
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 14 other locations - About 50 mins to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 136..139
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 140..143
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 144..147
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 148..151
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 159..162
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 163..166
      packages/__tests__/src/router/config-tests.spec.ts on lines 179..182
      packages/__tests__/src/router/config-tests.spec.ts on lines 183..186
      packages/__tests__/src/router/config-tests.spec.ts on lines 187..190
      packages/__tests__/src/router/config-tests.spec.ts on lines 191..194
      packages/__tests__/src/router/config-tests.spec.ts on lines 195..198
      packages/__tests__/src/router/config-tests.spec.ts on lines 202..205
      packages/__tests__/src/router/config-tests.spec.ts on lines 206..209
      packages/__tests__/src/router/config-tests.spec.ts on lines 210..213

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 51.

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

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

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

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

      Refactorings

      Further Reading

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

            @customElement({ name: 'a21', template: vp(2) })
            class A21 extends TestRouteViewModelBase {
              public constructor() { super(resolve(IHookInvocationAggregator), hookSpecs); }
            }
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 14 other locations - About 50 mins to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 136..139
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 140..143
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 144..147
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 148..151
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 155..158
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 163..166
      packages/__tests__/src/router/config-tests.spec.ts on lines 179..182
      packages/__tests__/src/router/config-tests.spec.ts on lines 183..186
      packages/__tests__/src/router/config-tests.spec.ts on lines 187..190
      packages/__tests__/src/router/config-tests.spec.ts on lines 191..194
      packages/__tests__/src/router/config-tests.spec.ts on lines 195..198
      packages/__tests__/src/router/config-tests.spec.ts on lines 202..205
      packages/__tests__/src/router/config-tests.spec.ts on lines 206..209
      packages/__tests__/src/router/config-tests.spec.ts on lines 210..213

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 51.

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

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

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

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

      Refactorings

      Further Reading

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

            @customElement({ name: 'a03', template: null })
            class A03 extends TestRouteViewModelBase {
              public constructor() { super(resolve(IHookInvocationAggregator), hookSpecs); }
            }
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 7 other locations - About 35 mins to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 112..115
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 116..119
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 124..127
      packages/__tests__/src/router/config-tests.spec.ts on lines 160..163
      packages/__tests__/src/router/config-tests.spec.ts on lines 164..167
      packages/__tests__/src/router/config-tests.spec.ts on lines 168..171
      packages/__tests__/src/router/config-tests.spec.ts on lines 172..175

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 47.

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

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

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

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

      Refactorings

      Further Reading

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

            @customElement({ name: 'a04', template: null })
            class A04 extends TestRouteViewModelBase {
              public constructor() { super(resolve(IHookInvocationAggregator), hookSpecs); }
            }
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 7 other locations - About 35 mins to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 112..115
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 116..119
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 120..123
      packages/__tests__/src/router/config-tests.spec.ts on lines 160..163
      packages/__tests__/src/router/config-tests.spec.ts on lines 164..167
      packages/__tests__/src/router/config-tests.spec.ts on lines 168..171
      packages/__tests__/src/router/config-tests.spec.ts on lines 172..175

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 47.

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

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

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

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

      Refactorings

      Further Reading

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

            @customElement({ name: 'a01', template: null })
            class A01 extends TestRouteViewModelBase {
              public constructor() { super(resolve(IHookInvocationAggregator), hookSpecs); }
            }
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 7 other locations - About 35 mins to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 116..119
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 120..123
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 124..127
      packages/__tests__/src/router/config-tests.spec.ts on lines 160..163
      packages/__tests__/src/router/config-tests.spec.ts on lines 164..167
      packages/__tests__/src/router/config-tests.spec.ts on lines 168..171
      packages/__tests__/src/router/config-tests.spec.ts on lines 172..175

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 47.

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

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

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

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

      Refactorings

      Further Reading

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

            @customElement({ name: 'a02', template: null })
            class A02 extends TestRouteViewModelBase {
              public constructor() { super(resolve(IHookInvocationAggregator), hookSpecs); }
            }
      Severity: Major
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 7 other locations - About 35 mins to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 112..115
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 120..123
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 124..127
      packages/__tests__/src/router/config-tests.spec.ts on lines 160..163
      packages/__tests__/src/router/config-tests.spec.ts on lines 164..167
      packages/__tests__/src/router/config-tests.spec.ts on lines 168..171
      packages/__tests__/src/router/config-tests.spec.ts on lines 172..175

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 47.

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

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

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

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

      Refactorings

      Further Reading

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

            @route({ routes: [A01] })
            @customElement({ name: 'root', template: vp(1) })
            class Root extends SimpleActivityTrackingVMBase {}
      Severity: Minor
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 1 other location - About 35 mins to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 315..317

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

      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

          @route({ routes: [A01] })
          @customElement({ name: 'root', template: vp(1) })
          class Root extends SimpleActivityTrackingVMBase {}
      Severity: Minor
      Found in packages/__tests__/src/router-lite/config-tests.spec.ts and 1 other location - About 35 mins to fix
      packages/__tests__/src/router-lite/config-tests.spec.ts on lines 449..451

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

      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