Microsoft/fast-dna

View on GitHub
packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts

Summary

Maintainability
F
1 wk
Test Coverage

File template-renderer.spec.ts has 323 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import "../install-dom-shim.js";
import { children, css, customElement, ExecutionContext, FASTElement, html, ref, repeat, slotted, when } from "@microsoft/fast-element";
import { expect, test } from "@playwright/test";
import fastSSR from "../exports.js";
import { consolidate } from "../test-utilities/consolidate.js";

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

            test("should render child elements into the element's light DOM", () => {
                const name = uniqueElementName();
                @customElement({
                    name,
                    shadowOptions: null
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 130..142

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

    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

            test("should not render declarative shadow DOM", () => {
                const name = uniqueElementName();
                @customElement({
                    name,
                    shadowOptions: null
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 173..185

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

    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

            test("should emit nothing when a 'when' directive's binding evaluates false ", () => {
                const { templateRenderer } = fastSSR();
                const result = templateRenderer.render(html`${when(x => false, html`<p>Hello world</p>`)}`)
    
                expect(consolidate(result)).toBe("");
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 323..328

    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

            test("should render a 'when' directive's content when the binding evaluates true", () => {
                const { templateRenderer } = fastSSR();
                const result = templateRenderer.render(html`${when(x => true, html`<p>Hello world</p>`)}`)
    
                expect(consolidate(result)).toBe("<p>Hello world</p>")
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 329..334

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

        test("should emit a native element with an attribute when the attr binding returns a string", () => {
            const { templateRenderer } = fastSSR();
            const result = consolidate(templateRenderer.render(html`<p id="${(x) => "test"}"></p>`));
    
            expect(result).toBe(`<p id="test"></p>`);
    packages/web-components/fast-ssr/src/element-renderer/elemenent-renderer.spec.ts on lines 136..144
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 277..282
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 283..288
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 290..295
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 305..310
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 311..316

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

            test("should render a template element with a classList property binding", () => {
                const { templateRenderer } = fastSSR();
                const result = templateRenderer.render(html`<template :classList=${x => "a b"}></template>`)
    
                expect(consolidate(result)).toBe(`<template class="a b"></template>`);
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 75..80
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 258..263

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

        test("should evaluate bindings for html element", () => {
            const { templateRenderer } = fastSSR();
            const result = consolidate(templateRenderer.render(html`<html attr=${x => "value"}></html>`));
    
            expect(result).toBe(`<html attr="value"></html>`);
    packages/web-components/fast-ssr/src/element-renderer/elemenent-renderer.spec.ts on lines 136..144
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 251..256
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 283..288
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 290..295
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 305..310
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 311..316

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

        test("should evaluate bindings for head element", () => {
            const { templateRenderer } = fastSSR();
            const result = consolidate(templateRenderer.render(html`<head attr=${x => "value"}></head>`));
    
            expect(result).toBe(`<head attr="value"></head>`);
    packages/web-components/fast-ssr/src/element-renderer/elemenent-renderer.spec.ts on lines 136..144
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 251..256
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 277..282
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 290..295
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 305..310
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 311..316

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

        test("should evaluate bindings for body element", () => {
            const { templateRenderer } = fastSSR();
            const result = consolidate(templateRenderer.render(html`<body attr=${x => "value"}></body>`));
    
            expect(result).toBe(`<body attr="value"></body>`);
    packages/web-components/fast-ssr/src/element-renderer/elemenent-renderer.spec.ts on lines 136..144
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 251..256
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 277..282
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 283..288
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 305..310
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 311..316

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

        test("should emit a custom element with an attribute binding when the attr binding returns a string", () => {
            const { templateRenderer } = fastSSR();
            const result = templateRenderer.render(html`<hello-world my-attr=${x => "foobar"}></hello-world>`)
    
            expect(consolidate(result)).toBe(`<hello-world  my-attr="foobar"><template shadowrootmode=\"open\"></template></hello-world>`);
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 68..73
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 75..80

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

            test("should emit class attribute to native elements", () => {
                const { templateRenderer } = fastSSR();
    
                const result = consolidate(templateRenderer.render(html`<p :classList=${ x => "foo bar"}>Hello world</p>`))
                expect(result).toBe(`<p class="foo bar">Hello world</p>`);
    packages/web-components/fast-ssr/src/element-renderer/elemenent-renderer.spec.ts on lines 136..144
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 251..256
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 277..282
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 283..288
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 290..295
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 311..316

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

            test("should emit class attribute to custom elements", () => {
                const { templateRenderer } = fastSSR();
    
                const result = consolidate(templateRenderer.render(html`<hello-world :classList=${x => "foo bar"}></hello-world>`))
                expect(result).toBe(`<hello-world  class="foo bar"><template shadowrootmode="open"></template></hello-world>`);
    packages/web-components/fast-ssr/src/element-renderer/elemenent-renderer.spec.ts on lines 136..144
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 251..256
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 277..282
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 283..288
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 290..295
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 305..310

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

            test("should render a template element with both static and dynamic attributes", () => {
                const { templateRenderer } = fastSSR();
                const result = templateRenderer.render(html`<template id="bar" name=${x => "foo"}></template>`)
    
                expect(consolidate(result)).toBe(`<template id="bar" name="foo"></template>`);
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 68..73
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 258..263

    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

        test("should not emit an attribute for a boolean attribute that returns false", () => {
            const { templateRenderer } = fastSSR();
            const result = consolidate(templateRenderer.render(html`<input type="checkbox" ?checked="${(x) => false}" />`));
    
            expect(result).toBe(`<input type="checkbox"  />`);
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 264..269

    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

        test("should emit an element with a boolean attribute when the attr binding returns true", () => {
            const { templateRenderer } = fastSSR();
            const result = consolidate(templateRenderer.render(html`<input type="checkbox" ?checked="${(x) => true}" />`));
    
            expect(result).toBe(`<input type="checkbox" checked />`);
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 270..275

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

            test("should render a template element with static attributes", () => {
                const { templateRenderer } = fastSSR();
                const result = templateRenderer.render(html`<template name="foo" id="bar"></template>`)
    
                expect(consolidate(result)).toBe(`<template name="foo" id="bar"></template>`);
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 88..93
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 94..99
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 115..120
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 122..127

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

    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

            test("should render a template with content", () => {
                const { templateRenderer } = fastSSR();
                const result = templateRenderer.render(html`<template name="bar"><p>Hello world</p></template>`)
    
                expect(consolidate(result)).toBe(`<template name="bar"><p>Hello world</p></template>`);
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 50..55
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 94..99
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 115..120
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 122..127

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

    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

            test("should emit a custom element with attributes and properties reflected from an element's root <template> element", () => {
                const { templateRenderer } = fastSSR();
                const result = templateRenderer.render(html`<with-host-attributes id="foo"></with-host-attributes>`)
    
                expect(consolidate(result)).toBe(`<with-host-attributes  id="foo" static="static" dynamic="dynamic" bool-true><template shadowrootmode=\"open\">value<slot></slot></template></with-host-attributes>`);
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 50..55
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 88..93
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 94..99
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 115..120

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

    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

            test("should render a custom element with a static attribute", () => {
                const { templateRenderer } = fastSSR();
                const result = templateRenderer.render(html`<hello-world id="test"></hello-world>`)
    
                expect(consolidate(result)).toBe(`<hello-world  id="test"><template shadowrootmode=\"open\"></template></hello-world>`);
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 50..55
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 88..93
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 94..99
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 122..127

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

    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

            test("should render a template as a child element", () => {
                const { templateRenderer } = fastSSR();
                const result = templateRenderer.render(html`<p><template name="bar"></template></p>`)
    
                expect(consolidate(result)).toBe(`<p><template name="bar"></template></p>`);
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 50..55
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 88..93
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 115..120
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 122..127

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

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

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

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

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

    Refactorings

    Further Reading

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

                const result = templateRenderer.render(html<typeof source>`${repeat(x => x.data, html<string>`${x => x}`)}`, templateRenderer.createRenderInfo(), source)
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 388..388

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

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

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

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

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

    Refactorings

    Further Reading

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

                const result = templateRenderer.render(html<typeof source>`${render(x => x.data, html<string>`${x => x}`)}`, templateRenderer.createRenderInfo(), source)
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 368..368

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

    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

                expect(consolidate(templateRenderer.render(html`<${html.partial(name)}></${html.partial(name)}>`))).toBe(`<${name}><template shadowrootmode="open"><p>Hello world</p></template></${name}>`);
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 212..212

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

    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

                expect(consolidate(templateRenderer.render(html`<${html.partial(name)}></${html.partial(name)}>`))).toBe(`<${name}><template shadowrootmode="open"></template></${name}>`);
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 210..210

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

    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

            test("should emit static shadow DOM template for a defined custom element", () => {
                const { templateRenderer } = fastSSR();
                const result = templateRenderer.render(html`<with-slot></with-slot>`)
    
                expect(consolidate(result)).toBe("<with-slot><template shadowrootmode=\"open\"><slot></slot></template></with-slot>");
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 44..49
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 109..114
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 188..193
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 195..200

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

    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

        test("should emit un-registered custom elements without any shadow DOM", () => {
            const { templateRenderer } = fastSSR();
            const result = templateRenderer.render(html`<unregistered-element>Hello world</unregistered-element>`)
    
            expect(consolidate(result)).toBe("<unregistered-element>Hello world</unregistered-element>");
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 44..49
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 103..108
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 109..114
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 188..193

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

    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

            test("should emit template element with shadowroot attribute for defined custom element", () => {
                const { templateRenderer } = fastSSR();
                const result = templateRenderer.render(html`<hello-world></hello-world>`)
    
                expect(consolidate(result)).toBe("<hello-world><template shadowrootmode=\"open\"></template></hello-world>");
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 44..49
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 103..108
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 188..193
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 195..200

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

    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

            test("should render a template element without attributes", () => {
                const { templateRenderer } = fastSSR();
                const result = templateRenderer.render(html`<template></template>`)
    
                expect(consolidate(result)).toBe("<template></template>");
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 103..108
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 109..114
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 188..193
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 195..200

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

    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

        test("should emit a single element template", () => {
            const { templateRenderer } = fastSSR();
            const result = templateRenderer.render(html`<p>Hello world</p>`)
    
            expect(consolidate(result)).toBe("<p>Hello world</p>")
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 44..49
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 103..108
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 109..114
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 195..200

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

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

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

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

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

    Refactorings

    Further Reading

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

                consolidate(templateRenderer.render(html<typeof source>`${repeat(x => x.data, html<string>`${(x, c) => {
                    expect(c.parent).toBe(source);
                    expect(c.parentContext).toBe(ctx)
                }}`)}`, templateRenderer.createRenderInfo(), source, ctx))
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 379..382

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

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

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

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

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

    Refactorings

    Further Reading

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

                consolidate(templateRenderer.render(html<typeof source>`${render(x => x.data, html`${(x, c) => {
                    expect(c.parent).toBe(source);
                    expect(c.parentContext).toBe(ctx)
                }}`)}`, templateRenderer.createRenderInfo(), source, ctx))
    packages/web-components/fast-ssr/src/template-renderer/template-renderer.spec.ts on lines 345..348

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

    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