department-of-veterans-affairs/vets-website

View on GitHub
src/applications/dhp-connected-devices/components/FAQSections.jsx

Summary

Maintainability
F
3 days
Test Coverage

Function SecondFAQSection has 172 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const SecondFAQSection = () => {
  return (
    <>
      <h3 className="dhp-faq-section-header">
        Connecting Your Device & Data Sharing
Severity: Major
Found in src/applications/dhp-connected-devices/components/FAQSections.jsx - About 6 hrs to fix

    File FAQSections.jsx has 379 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React from 'react';
    
    export const FirstFAQSection = () => {
      return (
        <>
    Severity: Minor
    Found in src/applications/dhp-connected-devices/components/FAQSections.jsx - About 5 hrs to fix

      Function ThirdFAQSection has 100 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const ThirdFAQSection = () => {
        return (
          <>
            <h3 className="dhp-faq-section-header">Troubleshooting</h3>
            <va-accordion
      Severity: Major
      Found in src/applications/dhp-connected-devices/components/FAQSections.jsx - About 4 hrs to fix

        Function FirstFAQSection has 71 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const FirstFAQSection = () => {
          return (
            <>
              <h3 className="dhp-faq-section-header">DHP Fitbit Pilot</h3>
              <va-accordion
        Severity: Major
        Found in src/applications/dhp-connected-devices/components/FAQSections.jsx - About 2 hrs to fix

          Function FourthFAQSection has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const FourthFAQSection = () => {
            return (
              <>
                <h3 className="dhp-faq-section-header">Feedback</h3>
                <va-accordion
          Severity: Minor
          Found in src/applications/dhp-connected-devices/components/FAQSections.jsx - About 1 hr to fix

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

                        <li>
                          <strong>Sign in</strong> to VA.gov with your DS Logon, My
                          HealtheVet, or ID.me account
                          <ol type="a">
                            <li>
            src/applications/dhp-connected-devices/components/FAQSections.jsx on lines 102..116

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 84.

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

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

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

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

            Refactorings

            Further Reading

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

                        <li>
                          <strong>Sign in</strong> to VA.gov with your DS Logon, My
                          HealtheVet, or ID.me account
                          <ol type="a">
                            <li>
            src/applications/dhp-connected-devices/components/FAQSections.jsx on lines 150..164

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 84.

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

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

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

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

            Refactorings

            Further Reading

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

                    <va-accordion-item
                      header="I have general questions or feedback about the pilot"
                      id="dhp-faq-fourth-section-first-question"
                      aria-controls="dhp-faq-fourth-section-first-question"
                      data-testid="faq-fourth-section-first-question"
            src/applications/dhp-connected-devices/components/FAQSections.jsx on lines 214..236

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

            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

                    <va-accordion-item
                      header="How will my private information be protected?"
                      id="dhp-faq-second-section-fifth-question"
                      aria-controls="dhp-faq-second-section-fifth-question"
                      data-testid="faq-second-section-fifth-question"
            src/applications/dhp-connected-devices/components/FAQSections.jsx on lines 369..379

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

            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

                        <li>
                          <strong>Login.gov</strong> - Access the Login.gov help center at{' '}
                          <va-telephone contact="8448756446" international />
                        </li>
            src/applications/dhp-connected-devices/components/FAQSections.jsx on lines 316..319

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 45.

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

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

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

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

            Refactorings

            Further Reading

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

                        <li>
                          <strong>DS Logon</strong> - Call the DMDC Support Office at{' '}
                          <va-telephone contact="8005389552" international />
                        </li>
            src/applications/dhp-connected-devices/components/FAQSections.jsx on lines 306..309

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 45.

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

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

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

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

            Refactorings

            Further Reading

            There are no issues that match your filters.

            Category
            Status