department-of-veterans-affairs/vets-website

View on GitHub
src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js

Summary

Maintainability
F
4 days
Test Coverage

File index.unit.spec.js has 627 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable no-plusplus */
import React from 'react';
import { expect } from 'chai';

import {

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

          expect(() => {
            for (let i = 0; i < miles.length - 1; i++) {
              if (
                Number.parseFloat(miles[i].textContent) >
                Number.parseFloat(miles[i + 1].textContent)
    src/applications/vaos/new-appointment/components/CommunityCareProviderSelectionPage/ProviderSortVariant.unit.spec.js on lines 230..238
    src/applications/vaos/new-appointment/components/CommunityCareProviderSelectionPage/ProviderSortVariant.unit.spec.js on lines 387..395
    src/applications/vaos/new-appointment/components/CommunityCareProviderSelectionPage/index.unit.spec.js on lines 509..517
    src/applications/vaos/new-appointment/components/CommunityCareProviderSelectionPage/index.unit.spec.js on lines 567..575
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 860..868
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 933..941

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 108.

    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

          const store = createTestStore({
            ...initialState,
            user: {
              ...initialState.user,
              profile: {
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 265..283
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 472..490
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 103..121
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 819..837
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 893..911
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 969..987

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

    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

          const store = createTestStore({
            ...initialState,
            user: {
              ...initialState.user,
              profile: {
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 172..190
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 472..490
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 103..121
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 819..837
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 893..911
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 969..987

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

    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

          const store = createTestStore({
            ...initialState,
            user: {
              ...initialState.user,
              profile: {
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 172..190
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 265..283
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 103..121
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 819..837
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 893..911
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 969..987

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

    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

          const state = {
            ...initialState,
            user: {
              ...initialState.user,
              profile: {
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 316..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 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

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

          facilities.slice(0, 5).forEach(f => {
            expect(screen.baseElement).to.contain.text(f.attributes.name);
          });
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 757..759

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

    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

          facilities.slice(0, 5).forEach(f => {
            expect(screen.baseElement).to.contain.text(f.attributes.name);
          });
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 203..205

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

    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

          mockSchedulingConfigurations([
            getSchedulingConfigurationMock({
              id: '983',
              typeOfCareId: TYPE_OF_CARE_ID,
              directEnabled: false,
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 451..462
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 646..657
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 685..696
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 712..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 50.

    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

          mockSchedulingConfigurations([
            getSchedulingConfigurationMock({
              id: '983',
              typeOfCareId: TYPE_OF_CARE_ID,
              directEnabled: true,
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 533..544
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 646..657
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 685..696
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 712..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 50.

    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

          mockSchedulingConfigurations([
            getSchedulingConfigurationMock({
              id: '983',
              typeOfCareId: TYPE_OF_CARE_ID,
              directEnabled: true,
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 451..462
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 533..544
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 646..657
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 712..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 50.

    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

          mockSchedulingConfigurations([
            getSchedulingConfigurationMock({
              id: '983',
              typeOfCareId: TYPE_OF_CARE_ID,
              directEnabled: true,
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 451..462
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 533..544
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 646..657
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 685..696

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

    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

          mockSchedulingConfigurations([
            getSchedulingConfigurationMock({
              id: '983',
              typeOfCareId: TYPE_OF_CARE_ID,
              directEnabled: true,
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 451..462
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 533..544
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 685..696
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 712..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 50.

    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

        const initialState = {
          user: {
            profile: {
              facilities: [
                { facilityId: '983', isCerner: false },
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 428..437
    src/applications/vaos/new-appointment/newAppointmentFlow.unit.spec.js on lines 25..40

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

    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

        const initialState = {
          user: {
            profile: {
              facilities: [
                { facilityId: '983', isCerner: false },
    src/applications/vaos/covid-19-vaccine/components/VAFacilityPage/index.unit.spec.js on lines 231..240
    src/applications/vaos/new-appointment/newAppointmentFlow.unit.spec.js on lines 25..40

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

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

          await waitFor(() =>
            expect(screen.history.push.firstCall.args[0]).to.equal(
              '/new-covid-19-vaccine-appointment/choose-clinic',
            ),
          );
    src/applications/vaos/appointment-list/components/AppointmentsPage/index.unit.spec.js on lines 94..96
    src/applications/vaos/covid-19-vaccine/components/ClinicChoicePage.unit.spec.js on lines 94..98
    src/applications/vaos/covid-19-vaccine/components/SecondDosePage.unit.spec.js on lines 117..121
    src/applications/vaos/new-appointment/components/ClinicChoicePage/index.unit.spec.js on lines 155..159
    src/applications/vaos/new-appointment/components/ClinicChoicePage/index.unit.spec.js on lines 233..237
    src/applications/vaos/new-appointment/components/DateTimeSelectPage/index.unit.spec.js on lines 785..789
    src/applications/vaos/new-appointment/components/TypeOfCarePage/index.unit.spec.js on lines 151..155
    src/applications/vaos/new-appointment/components/TypeOfCarePage/index.unit.spec.js on lines 170..174
    src/applications/vaos/new-appointment/components/TypeOfCarePage/index.unit.spec.js on lines 435..439
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.eligibility.unit.spec.js on lines 735..739
    src/applications/vaos/new-appointment/components/VAFacilityPage/VAFacilityPageV2.unit.spec.js on lines 1324..1328

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

    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