department-of-veterans-affairs/vets-website

View on GitHub
src/applications/vaos/new-appointment/index.jsx

Summary

Maintainability
F
4 days
Test Coverage

Function NewAppointment has 209 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function NewAppointment() {
  const isCernerOnlyPatient = useSelector(selectIsCernerOnlyPatient);
  const isNewAppointmentStarted = useSelector(selectIsNewAppointmentStarted);
  const featureBreadcrumbUrlUpdate = useSelector(state =>
    selectFeatureBreadcrumbUrlUpdate(state),
Severity: Major
Found in src/applications/vaos/new-appointment/index.jsx - About 1 day to fix

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

              <Route
                path={[
                  `${match.url}/va-request/contact-information`,
                  `${match.url}/community-request/contact-information`,
                  `${match.url}/contact-information`,
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 2 other locations - About 2 hrs to fix
    src/applications/vaos/new-appointment/index.jsx on lines 158..168
    src/applications/vaos/new-appointment/index.jsx on lines 169..177

    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

              <Route
                path={[
                  `${match.url}/va-request/review`,
                  `${match.url}/community-request/review`,
                  `${match.url}/review`,
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 2 other locations - About 2 hrs to fix
    src/applications/vaos/new-appointment/index.jsx on lines 75..83
    src/applications/vaos/new-appointment/index.jsx on lines 158..168

    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

              <Route
                path={[
                  `${match.url}/va-request/reason`,
                  `${match.url}/community-request/reason`,
                  `${match.url}/reason`,
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 2 other locations - About 2 hrs to fix
    src/applications/vaos/new-appointment/index.jsx on lines 75..83
    src/applications/vaos/new-appointment/index.jsx on lines 169..177

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

              <Route
                path={[
                  `${match.url}/va-request/preferred-method`,
                  `${match.url}/choose-visit-type`,
                ]}
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 3 other locations - About 1 hr to fix
    src/applications/vaos/new-appointment/index.jsx on lines 125..134
    src/applications/vaos/new-appointment/index.jsx on lines 135..144
    src/applications/vaos/new-appointment/index.jsx on lines 145..154

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

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

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

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

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

    Refactorings

    Further Reading

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

              <Route
                path={[
                  `${match.url}/va-request/community-care-preferences`,
                  `${match.url}/community-request/preferred-provider`,
                ]}
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 3 other locations - About 1 hr to fix
    src/applications/vaos/new-appointment/index.jsx on lines 87..94
    src/applications/vaos/new-appointment/index.jsx on lines 135..144
    src/applications/vaos/new-appointment/index.jsx on lines 145..154

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

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

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

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

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

    Refactorings

    Further Reading

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

              <Route
                path={[
                  `${match.url}/va-request/community-care-language`,
                  `${match.url}/community-request/preferred-language`,
                ]}
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 3 other locations - About 1 hr to fix
    src/applications/vaos/new-appointment/index.jsx on lines 87..94
    src/applications/vaos/new-appointment/index.jsx on lines 125..134
    src/applications/vaos/new-appointment/index.jsx on lines 145..154

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

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

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

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

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

    Refactorings

    Further Reading

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

              <Route
                path={[
                  `${match.url}/va-request/choose-closest-city`,
                  `${match.url}/community-request/closest-city`,
                ]}
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 3 other locations - About 1 hr to fix
    src/applications/vaos/new-appointment/index.jsx on lines 87..94
    src/applications/vaos/new-appointment/index.jsx on lines 125..134
    src/applications/vaos/new-appointment/index.jsx on lines 135..144

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

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

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

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

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

    Refactorings

    Further Reading

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

              <Route exact path={`${match.url}/va-request/`}>
                <VARequest changeCrumb={newTitle => setCrumb(newTitle)} />
              </Route>
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 1 other location - About 1 hr to fix
    src/applications/vaos/new-appointment/index.jsx on lines 115..117

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

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

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

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

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

    Refactorings

    Further Reading

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

              <Route exact path={`${match.url}/community-request/`}>
                <CCRequest changeCrumb={newTitle => setCrumb(newTitle)} />
              </Route>
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 1 other location - About 1 hr to fix
    src/applications/vaos/new-appointment/index.jsx on lines 112..114

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

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

              <Route path={`${match.url}/date-time`}>
                <DateTimeSelectPage changeCrumb={newTitle => setCrumb(newTitle)} />
              </Route>
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 10 other locations - About 1 hr to fix
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 126..128
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 174..176
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 187..189
    src/applications/vaos/new-appointment/index.jsx on lines 84..86
    src/applications/vaos/new-appointment/index.jsx on lines 95..97
    src/applications/vaos/new-appointment/index.jsx on lines 98..100
    src/applications/vaos/new-appointment/index.jsx on lines 101..105
    src/applications/vaos/new-appointment/index.jsx on lines 106..108
    src/applications/vaos/new-appointment/index.jsx on lines 118..120
    src/applications/vaos/new-appointment/index.jsx on lines 155..157

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

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

              <Route path={`${match.url}/clinic`}>
                <ClinicChoicePage changeCrumb={newTitle => setCrumb(newTitle)} />
              </Route>
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 10 other locations - About 1 hr to fix
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 126..128
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 174..176
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 187..189
    src/applications/vaos/new-appointment/index.jsx on lines 84..86
    src/applications/vaos/new-appointment/index.jsx on lines 95..97
    src/applications/vaos/new-appointment/index.jsx on lines 98..100
    src/applications/vaos/new-appointment/index.jsx on lines 101..105
    src/applications/vaos/new-appointment/index.jsx on lines 106..108
    src/applications/vaos/new-appointment/index.jsx on lines 109..111
    src/applications/vaos/new-appointment/index.jsx on lines 118..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 55.

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

              <Route path={`${match.url}/preferred-date`}>
                <PreferredDatePage changeCrumb={newTitle => setCrumb(newTitle)} />
              </Route>
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 10 other locations - About 1 hr to fix
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 126..128
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 174..176
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 187..189
    src/applications/vaos/new-appointment/index.jsx on lines 84..86
    src/applications/vaos/new-appointment/index.jsx on lines 95..97
    src/applications/vaos/new-appointment/index.jsx on lines 98..100
    src/applications/vaos/new-appointment/index.jsx on lines 101..105
    src/applications/vaos/new-appointment/index.jsx on lines 109..111
    src/applications/vaos/new-appointment/index.jsx on lines 118..120
    src/applications/vaos/new-appointment/index.jsx on lines 155..157

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

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

              <Route path={`${match.url}/sleep-care`}>
                <TypeOfSleepCarePage changeCrumb={newTitle => setCrumb(newTitle)} />
              </Route>
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 10 other locations - About 1 hr to fix
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 126..128
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 174..176
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 187..189
    src/applications/vaos/new-appointment/index.jsx on lines 84..86
    src/applications/vaos/new-appointment/index.jsx on lines 98..100
    src/applications/vaos/new-appointment/index.jsx on lines 101..105
    src/applications/vaos/new-appointment/index.jsx on lines 106..108
    src/applications/vaos/new-appointment/index.jsx on lines 109..111
    src/applications/vaos/new-appointment/index.jsx on lines 118..120
    src/applications/vaos/new-appointment/index.jsx on lines 155..157

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

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

              <Route path={`${match.url}/facility-type`}>
                <TypeOfFacilityPage changeCrumb={newTitle => setCrumb(newTitle)} />
              </Route>
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 10 other locations - About 1 hr to fix
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 126..128
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 174..176
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 187..189
    src/applications/vaos/new-appointment/index.jsx on lines 95..97
    src/applications/vaos/new-appointment/index.jsx on lines 98..100
    src/applications/vaos/new-appointment/index.jsx on lines 101..105
    src/applications/vaos/new-appointment/index.jsx on lines 106..108
    src/applications/vaos/new-appointment/index.jsx on lines 109..111
    src/applications/vaos/new-appointment/index.jsx on lines 118..120
    src/applications/vaos/new-appointment/index.jsx on lines 155..157

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

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

              <Route path={`${match.url}/eye-care`}>
                <TypeOfEyeCarePage changeCrumb={newTitle => setCrumb(newTitle)} />
              </Route>
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 10 other locations - About 1 hr to fix
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 126..128
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 174..176
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 187..189
    src/applications/vaos/new-appointment/index.jsx on lines 84..86
    src/applications/vaos/new-appointment/index.jsx on lines 95..97
    src/applications/vaos/new-appointment/index.jsx on lines 101..105
    src/applications/vaos/new-appointment/index.jsx on lines 106..108
    src/applications/vaos/new-appointment/index.jsx on lines 109..111
    src/applications/vaos/new-appointment/index.jsx on lines 118..120
    src/applications/vaos/new-appointment/index.jsx on lines 155..157

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

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

              <Route path={`${match.url}/audiology-care`}>
                <TypeOfAudiologyCarePage
                  changeCrumb={newTitle => setCrumb(newTitle)}
                />
              </Route>
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 10 other locations - About 1 hr to fix
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 126..128
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 174..176
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 187..189
    src/applications/vaos/new-appointment/index.jsx on lines 84..86
    src/applications/vaos/new-appointment/index.jsx on lines 95..97
    src/applications/vaos/new-appointment/index.jsx on lines 98..100
    src/applications/vaos/new-appointment/index.jsx on lines 106..108
    src/applications/vaos/new-appointment/index.jsx on lines 109..111
    src/applications/vaos/new-appointment/index.jsx on lines 118..120
    src/applications/vaos/new-appointment/index.jsx on lines 155..157

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

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

              <Route path={`${match.url}/location`}>
                <VAFacilityPageV2 changeCrumb={newTitle => setCrumb(newTitle)} />
              </Route>
    Severity: Major
    Found in src/applications/vaos/new-appointment/index.jsx and 10 other locations - About 1 hr to fix
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 126..128
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 174..176
    src/applications/vaos/covid-19-vaccine/index.jsx on lines 187..189
    src/applications/vaos/new-appointment/index.jsx on lines 84..86
    src/applications/vaos/new-appointment/index.jsx on lines 95..97
    src/applications/vaos/new-appointment/index.jsx on lines 98..100
    src/applications/vaos/new-appointment/index.jsx on lines 101..105
    src/applications/vaos/new-appointment/index.jsx on lines 106..108
    src/applications/vaos/new-appointment/index.jsx on lines 109..111
    src/applications/vaos/new-appointment/index.jsx on lines 155..157

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

    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