Microsoft/fast-dna

View on GitHub
packages/web-components/fast-element/src/di/di.integration.spec.ts

Summary

Maintainability
F
2 wks
Test Coverage

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

import { DI, Container, inject, Registration, singleton } from "./di.js";
import chai, { expect } from "chai";
import spies from "chai-spies";
import type { ContextDecorator } from "../context.js";

Severity: Major
Found in packages/web-components/fast-element/src/di/di.integration.spec.ts - About 1 day to fix

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

            it(`singleton child registration returns the same instance each time`, function () {
                @inject(ISingleton)
                class TransientParent implements ITransientParent {
                    public constructor(public dep: ISingleton) {}
                }
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 495..518

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

    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(`instance child registration returns the same instance each time`, function () {
                @inject(IInstance)
                class TransientParent implements ITransientParent {
                    public constructor(public dep: IInstance) {}
                }
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 470..493

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

    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(`singleton registration is reused by the singleton parent`, function () {
                @inject(ISingleton)
                class SingletonParent implements ISingletonParent {
                    public constructor(public dep: ISingleton) {}
                }
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 569..591
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 617..639

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

    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(`transient child registration is reused by the singleton parent`, function () {
                @inject(ITransient)
                class SingletonParent implements ISingletonParent {
                    public constructor(public dep: ITransient) {}
                }
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 593..615
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 617..639

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

    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(`instance registration is reused by the singleton parent`, function () {
                @inject(IInstance)
                class SingletonParent implements ISingletonParent {
                    public constructor(public dep: IInstance) {}
                }
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 569..591
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 593..615

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

    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(`instance registration is reused by the instance parent`, function () {
                @inject(IInstance)
                class InstanceParent implements IInstanceParent {
                    public constructor(public dep: IInstance) {}
                }
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 685..703
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 705..723

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

    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(`transient registration is reused by the instance parent`, function () {
                @inject(ITransient)
                class InstanceParent implements IInstanceParent {
                    public constructor(public dep: ITransient) {}
                }
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 705..723
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 725..743

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

    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(`singleton registration is reused by the instance parent`, function () {
                @inject(ISingleton)
                class InstanceParent implements IInstanceParent {
                    public constructor(public dep: ISingleton) {}
                }
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 685..703
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 725..743

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

    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 register(cls: any) {
                ITransientParent = DI.createContext<ITransientParent>(
                    "ITransientParent",
                    x => x.transient(cls)
                );
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 562..567

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 47.

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

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

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

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

    Refactorings

    Further Reading

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

            function register(cls: any) {
                ISingletonParent = DI.createContext<ISingletonParent>(
                    "ISingletonParent",
                    x => x.singleton(cls)
                );
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 438..443

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

                expect(callback).to.have.been.first.called.with(
                    container,
                    container,
                    container.getResolver(ICallback)
                );
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 160..164
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 165..169
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 334..338
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 339..343
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 414..418
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 419..423
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 538..542
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 543..547
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 659..663

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

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

                expect(callback).to.have.been.first.called.with(
                    container,
                    container,
                    container.getResolver(ICallback)
                );
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 160..164
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 165..169
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 334..338
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 339..343
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 414..418
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 419..423
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 538..542
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 543..547
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 763..767

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

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

                expect(callback).to.have.been.first.called.with(
                    container,
                    container,
                    container.getResolver(ICallback)
                );
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 160..164
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 165..169
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 339..343
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 414..418
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 419..423
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 538..542
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 543..547
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 659..663
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 763..767

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

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

                expect(callback).to.have.been.second.called.with(
                    container,
                    container,
                    container.getResolver(ICallback)
                );
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 160..164
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 165..169
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 334..338
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 339..343
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 414..418
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 538..542
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 543..547
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 659..663
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 763..767

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

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

                expect(callback).to.have.been.first.called.with(
                    container,
                    container,
                    container.getResolver(ICallback)
                );
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 160..164
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 165..169
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 334..338
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 339..343
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 419..423
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 538..542
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 543..547
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 659..663
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 763..767

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

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

                expect(callback).to.have.been.second.called.with(
                    container,
                    container,
                    container.getResolver(ICallback)
                );
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 160..164
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 165..169
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 334..338
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 339..343
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 414..418
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 419..423
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 538..542
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 659..663
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 763..767

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

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

                expect(callback).to.have.been.first.called.with(
                    container,
                    container,
                    container.getResolver(ICallback)
                );
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 160..164
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 165..169
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 334..338
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 339..343
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 414..418
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 419..423
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 543..547
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 659..663
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 763..767

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

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

                expect(callback).to.have.been.first.called.with(
                    container,
                    container,
                    container.getResolver(ICallback)
                );
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 165..169
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 334..338
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 339..343
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 414..418
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 419..423
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 538..542
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 543..547
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 659..663
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 763..767

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

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

                expect(callback).to.have.been.second.called.with(
                    container,
                    container,
                    container.getResolver(ICallback)
                );
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 160..164
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 334..338
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 339..343
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 414..418
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 419..423
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 538..542
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 543..547
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 659..663
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 763..767

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

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

                expect(callback).to.have.been.second.called.with(
                    container,
                    container,
                    container.getResolver(ICallback)
                );
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 160..164
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 165..169
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 334..338
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 414..418
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 419..423
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 538..542
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 543..547
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 659..663
    packages/web-components/fast-element/src/di/di.integration.spec.ts on lines 763..767

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

    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