aurelia/aurelia

View on GitHub
packages/__tests__/src/router-lite/current-route.spec.ts

Summary

Maintainability
F
2 wks
Test Coverage

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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-1@vp2/c-12+c-2@vp1/c-22',
          url: 'c-1@vp2/c-12+c-2@vp1/c-22',
          title: 'C12 | C1 | C22 | C2',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 2 other locations - About 7 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 801..834
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 837..870

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

        assertCurrentRoute(rootVm.currentRoute, {
          path: '+',
          url: '',
          title: 'C11 | C1 | C11 | C1',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 2 other locations - About 7 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 837..870
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 873..906

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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-1@vp1/c-11+c-2@vp2/c-21',
          url: 'c-1@vp1/c-11+c-2@vp2/c-21',
          title: 'C11 | C1 | C21 | C2',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 2 other locations - About 7 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 801..834
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 873..906

    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

          parameterInformation: [
            {
              config: { id: 'r2' } as RouteConfig,
              viewport: 'vp1',
              params: emptyParams,
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 6 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 914..941

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

    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

          parameterInformation: [
            {
              config: { id: 'r2' } as RouteConfig,
              viewport: 'vp1',
              params: emptyParams,
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 6 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 950..977

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

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-1/2@vp1+c-1/4@vp2',
          url: 'c-1/2@vp1+c-1/4@vp2',
          title: 'C1 | C1',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 4 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 691..710

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

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-2/1@vp1+c-1/3@vp2',
          url: 'c-2/1@vp1+c-1/3@vp2',
          title: 'C2 | C1',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 4 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 713..732

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

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-2/c-21/7',
          url: 'c-2/c-21/7?fizz=bizz',
          title: 'C21 | C2',
          query: new URLSearchParams('fizz=bizz'),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 4 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 398..418

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

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-1/c-12/6',
          url: 'c-1/c-12/6?foo=bar',
          title: 'C12 | C1',
          query: new URLSearchParams('foo=bar'),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 4 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 421..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 120.

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-1/c-11/3',
          url: 'c-1/c-11/3',
          title: 'C11 | C1',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 4 other locations - About 4 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 283..303
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 306..326
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 352..372
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 375..395

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

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-2/c-21/4',
          url: 'c-2/c-21/4',
          title: 'C21 | C2',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 4 other locations - About 4 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 283..303
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 306..326
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 329..349
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 375..395

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

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-2/c-22/5',
          url: 'c-2/c-22/5',
          title: 'C22 | C2',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 4 other locations - About 4 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 283..303
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 306..326
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 329..349
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 352..372

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

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-1/c-12/2',
          url: 'c-1/c-12/2',
          title: 'C12 | C1',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 4 other locations - About 4 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 283..303
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 329..349
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 352..372
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 375..395

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

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-1/c-12/1',
          url: 'c-1/c-12/1',
          title: 'C12 | C1',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 4 other locations - About 4 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 306..326
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 329..349
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 352..372
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 375..395

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

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: '',
          url: '',
          title: 'C11 | C1',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 3 other locations - About 3 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 237..257
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 260..280
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 488..508

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 113.

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-1/c-11',
          url: 'c-1/c-11',
          title: 'C11 | C1',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 3 other locations - About 3 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 214..234
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 260..280
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 488..508

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 113.

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-2/c-21',
          url: 'c-2/c-21',
          title: 'C21 | C2',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 3 other locations - About 3 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 214..234
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 237..257
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 488..508

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 113.

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: '',
          url: '',
          title: 'C11 | C1',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 3 other locations - About 3 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 214..234
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 237..257
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 260..280

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

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: '+',
          url: '',
          title: 'C1 | C1',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 2 other locations - About 3 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 625..644
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 647..666

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

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-1@vp1+c-2@vp2',
          url: 'c-1@vp1+c-2@vp2',
          title: 'C1 | C2',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 2 other locations - About 3 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 603..622
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 647..666

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

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-1@vp2+c-2@vp1',
          url: 'c-1@vp2+c-2@vp1',
          title: 'C1 | C2',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 2 other locations - About 3 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 603..622
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 625..644

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

    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

        @route({
          routes: [
            { id: 'r1', path: ['', 'c-1', 'c-1/:id1'], component: C1, title: 'C1' },
            { id: 'r2', path: ['c-2', 'c-2/:id2'], component: C2, title: 'C2' },
          ]
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 3 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 589..598

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 105.

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

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

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

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

    Refactorings

    Further Reading

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

        @route({
          routes: [
            { id: 'r1', path: ['', 'c-1', 'c-1/:id1'], component: C1, title: 'C1' },
            { id: 'r2', path: ['c-2', 'c-2/:id2'], component: C2, title: 'C2' },
          ]
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 3 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 44..53

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 105.

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

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

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

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

    Refactorings

    Further Reading

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

        @route({
          routes: [
            { id: 'r1', path: ['', 'c-1'], component: C1, title: 'C1' },
            { id: 'r2', path: ['c-2'], component: C2, title: 'C2' },
          ]
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 2 other locations - About 3 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 474..483
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 787..796

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

        @route({
          routes: [
            { id: 'r1', path: ['', 'c-1/:id{{^\\d+$}}?'], component: C1, title: 'C1' },
            { id: 'r2', path: ['c-2/:id{{^\\d+$}}?'], component: C2, title: 'C2' },
          ]
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 2 other locations - About 3 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 200..209
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 787..796

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

        @route({
          routes: [
            { id: 'r1', path: ['', 'c-1'], component: C1, title: 'C1' },
            { id: 'r2', path: ['c-2'], component: C2, title: 'C2' },
          ]
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 2 other locations - About 3 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 200..209
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 474..483

    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

        @route({
          routes: [
            { id: 'r11', path: ['', 'c-11', 'c-11/:id1'], component: C11, title: 'C11' },
            { id: 'r12', path: ['c-12', 'c-12/:id2'], component: C12, title: 'C12' },
          ]
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 2 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 769..776

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

    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

        @route({
          routes: [
            { id: 'r11', path: ['', 'c-11', 'c-11/:id1'], component: C11, title: 'C11' },
            { id: 'r12', path: ['c-12', 'c-12/:id2'], component: C12, title: 'C12' },
          ]
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 2 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 182..189

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

    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

        @route({
          routes: [
            { id: 'r21', path: ['', 'c-21', 'c-21/:id1'], component: C21, title: 'C21' },
            { id: 'r22', path: ['c-22', 'c-22/:id2'], component: C22, title: 'C22' },
          ]
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 2 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 778..785

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

        @route({
          routes: [
            { id: 'r21', path: ['', 'c-21', 'c-21/:id1'], component: C21, title: 'C21' },
            { id: 'r22', path: ['c-22', 'c-22/:id2'], component: C22, title: 'C22' },
          ]
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 2 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 191..198

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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-1/3',
          url: 'c-1/3?foo=bar',
          title: 'C1',
          query: new URLSearchParams('foo=bar'),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 2 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 154..167

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

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-2/4',
          url: 'c-2/4?fizz=bizz',
          title: 'C2',
          query: new URLSearchParams('fizz=bizz'),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 2 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 138..151

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

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-2/2',
          url: 'c-2/2',
          title: 'C2',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 2 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 106..119

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-1/1',
          url: 'c-1/1',
          title: 'C1',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 2 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 122..135

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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-1',
          url: 'c-1',
          title: 'C1',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 2 other locations - About 2 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 58..71
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 90..103

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

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: '',
          url: '',
          title: 'C1',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 2 other locations - About 2 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 74..87
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 90..103

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

    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

        assertCurrentRoute(rootVm.currentRoute, {
          path: 'c-2',
          url: 'c-2',
          title: 'C2',
          query: new URLSearchParams(),
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 2 other locations - About 2 hrs to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 58..71
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 74..87

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

    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

        for (let i = 0; i < actual.parameterInformation.length; i++) {
          assertParameterInformation(actual.parameterInformation[i], expected.parameterInformation[i], `${messagePrefix} - parameterInformation[${i}]`);
        }
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 1 hr to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 32..34

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 69.

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

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

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

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

    Refactorings

    Further Reading

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

        for (let i = 0; i < actual.children.length; i++) {
          assertParameterInformation(actual.children[i], expected.children[i], `${messagePrefix}.children[${i}]`);
        }
    Severity: Major
    Found in packages/__tests__/src/router-lite/current-route.spec.ts and 1 other location - About 1 hr to fix
    packages/__tests__/src/router-lite/current-route.spec.ts on lines 18..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 69.

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

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

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

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

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status