department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,796 of 12,796 total issues

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

export const App = ({
  loggedIn,
  location,
  children,
  formData,
Severity: Major
Found in src/applications/appeals/testing/sc/containers/App.jsx and 9 other locations - About 1 hr to fix
src/applications/appeals/995/containers/App.jsx on lines 41..183
src/applications/gi/components/profile/CalculateYourBenefitsForm.jsx on lines 34..1236
src/applications/gi/containers/ProfilePage.jsx on lines 18..123
src/applications/gi/containers/search/FilterBeforeResults.jsx on lines 300..888
src/applications/mhv-secure-messaging/components/shared/RouteLeavingGuard.jsx on lines 8..100
src/applications/pact-act/containers/questions/CheckboxGroup.jsx on lines 24..118
src/applications/vaos/components/calendar/CalendarOptionsSlots.jsx on lines 39..146
src/platform/forms-system/src/js/widgets/SelectWidget.jsx on lines 18..71
src/applications/disability-benefits/all-claims/Form526EZApp.jsx on lines 85..250

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

export const Form526Entry = ({
  children,
  inProgressFormId,
  isBDDForm,
  location,
src/applications/appeals/995/containers/App.jsx on lines 41..183
src/applications/appeals/testing/sc/containers/App.jsx on lines 41..183
src/applications/gi/components/profile/CalculateYourBenefitsForm.jsx on lines 34..1236
src/applications/gi/containers/ProfilePage.jsx on lines 18..123
src/applications/gi/containers/search/FilterBeforeResults.jsx on lines 300..888
src/applications/mhv-secure-messaging/components/shared/RouteLeavingGuard.jsx on lines 8..100
src/applications/pact-act/containers/questions/CheckboxGroup.jsx on lines 24..118
src/applications/vaos/components/calendar/CalendarOptionsSlots.jsx on lines 39..146
src/platform/forms-system/src/js/widgets/SelectWidget.jsx on lines 18..71

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

export const App = ({
  loggedIn,
  location,
  children,
  formData,
Severity: Major
Found in src/applications/appeals/995/containers/App.jsx and 9 other locations - About 1 hr to fix
src/applications/appeals/testing/sc/containers/App.jsx on lines 41..183
src/applications/gi/components/profile/CalculateYourBenefitsForm.jsx on lines 34..1236
src/applications/gi/containers/ProfilePage.jsx on lines 18..123
src/applications/gi/containers/search/FilterBeforeResults.jsx on lines 300..888
src/applications/mhv-secure-messaging/components/shared/RouteLeavingGuard.jsx on lines 8..100
src/applications/pact-act/containers/questions/CheckboxGroup.jsx on lines 24..118
src/applications/vaos/components/calendar/CalendarOptionsSlots.jsx on lines 39..146
src/platform/forms-system/src/js/widgets/SelectWidget.jsx on lines 18..71
src/applications/disability-benefits/all-claims/Form526EZApp.jsx on lines 85..250

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

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

      if (!checkResults.checkTypeAndExtensionMatches) {
        allFiles[idx] = {
          file: currentFile,
          name: currentFile.name,
          errorMessage: FILE_TYPE_MISMATCH_ERROR,
src/applications/pre-need/components/FileField.jsx on lines 271..279
src/platform/forms-system/src/js/fields/FileField.jsx on lines 264..272

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

export function ProfilePage({
  constants,
  profile,
  calculator,
  dispatchFetchProfile,
Severity: Major
Found in src/applications/gi/containers/ProfilePage.jsx and 9 other locations - About 1 hr to fix
src/applications/appeals/995/containers/App.jsx on lines 41..183
src/applications/appeals/testing/sc/containers/App.jsx on lines 41..183
src/applications/gi/components/profile/CalculateYourBenefitsForm.jsx on lines 34..1236
src/applications/gi/containers/search/FilterBeforeResults.jsx on lines 300..888
src/applications/mhv-secure-messaging/components/shared/RouteLeavingGuard.jsx on lines 8..100
src/applications/pact-act/containers/questions/CheckboxGroup.jsx on lines 24..118
src/applications/vaos/components/calendar/CalendarOptionsSlots.jsx on lines 39..146
src/platform/forms-system/src/js/widgets/SelectWidget.jsx on lines 18..71
src/applications/disability-benefits/all-claims/Form526EZApp.jsx on lines 85..250

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

function CalculateYourBenefitsForm({
  calculatorInputChange,
  displayedInputs,
  eligibility,
  eligibilityChange,
src/applications/appeals/995/containers/App.jsx on lines 41..183
src/applications/appeals/testing/sc/containers/App.jsx on lines 41..183
src/applications/gi/containers/ProfilePage.jsx on lines 18..123
src/applications/gi/containers/search/FilterBeforeResults.jsx on lines 300..888
src/applications/mhv-secure-messaging/components/shared/RouteLeavingGuard.jsx on lines 8..100
src/applications/pact-act/containers/questions/CheckboxGroup.jsx on lines 24..118
src/applications/vaos/components/calendar/CalendarOptionsSlots.jsx on lines 39..146
src/platform/forms-system/src/js/widgets/SelectWidget.jsx on lines 18..71
src/applications/disability-benefits/all-claims/Form526EZApp.jsx on lines 85..250

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

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

      if (!checkResults.checkTypeAndExtensionMatches) {
        allFiles[idx] = {
          file: currentFile,
          name: currentFile.name,
          errorMessage: FILE_TYPE_MISMATCH_ERROR,
Severity: Major
Found in src/platform/forms-system/src/js/fields/FileField.jsx and 2 other locations - About 1 hr to fix
src/applications/pre-need/components/FileField.jsx on lines 271..279
src/applications/simple-forms/40-0247/components/FileField.jsx on lines 277..285

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

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

  const localStorageValues = useMemo(() => {
    return {
      atExpires: localStorage.atExpires,
      hasSession: localStorage.hasSession,
      sessionExpiration: localStorage.sessionExpiration,
src/applications/mhv-secure-messaging/components/ComposeForm/ComposeForm.jsx on lines 128..135
src/applications/mhv-secure-messaging/components/ComposeForm/ReplyDraftItem.jsx on lines 93..100

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

function SelectWidget({
  schema,
  id,
  options,
  value,
Severity: Major
Found in src/platform/forms-system/src/js/widgets/SelectWidget.jsx and 9 other locations - About 1 hr to fix
src/applications/appeals/995/containers/App.jsx on lines 41..183
src/applications/appeals/testing/sc/containers/App.jsx on lines 41..183
src/applications/gi/components/profile/CalculateYourBenefitsForm.jsx on lines 34..1236
src/applications/gi/containers/ProfilePage.jsx on lines 18..123
src/applications/gi/containers/search/FilterBeforeResults.jsx on lines 300..888
src/applications/mhv-secure-messaging/components/shared/RouteLeavingGuard.jsx on lines 8..100
src/applications/pact-act/containers/questions/CheckboxGroup.jsx on lines 24..118
src/applications/vaos/components/calendar/CalendarOptionsSlots.jsx on lines 39..146
src/applications/disability-benefits/all-claims/Form526EZApp.jsx on lines 85..250

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

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

      if (!checkResults.checkTypeAndExtensionMatches) {
        allFiles[idx] = {
          file: currentFile,
          name: currentFile.name,
          errorMessage: FILE_TYPE_MISMATCH_ERROR,
Severity: Major
Found in src/applications/pre-need/components/FileField.jsx and 2 other locations - About 1 hr to fix
src/applications/simple-forms/40-0247/components/FileField.jsx on lines 277..285
src/platform/forms-system/src/js/fields/FileField.jsx on lines 264..272

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

export const RouteLeavingGuard = ({
  navigate,
  when,
  modalVisible,
  updateModalVisible,
src/applications/appeals/995/containers/App.jsx on lines 41..183
src/applications/appeals/testing/sc/containers/App.jsx on lines 41..183
src/applications/gi/components/profile/CalculateYourBenefitsForm.jsx on lines 34..1236
src/applications/gi/containers/ProfilePage.jsx on lines 18..123
src/applications/gi/containers/search/FilterBeforeResults.jsx on lines 300..888
src/applications/pact-act/containers/questions/CheckboxGroup.jsx on lines 24..118
src/applications/vaos/components/calendar/CalendarOptionsSlots.jsx on lines 39..146
src/platform/forms-system/src/js/widgets/SelectWidget.jsx on lines 18..71
src/applications/disability-benefits/all-claims/Form526EZApp.jsx on lines 85..250

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

export function FilterBeforeResults({
  dispatchFilterChange,
  dispatchError,
  filters,
  modalClose,
src/applications/appeals/995/containers/App.jsx on lines 41..183
src/applications/appeals/testing/sc/containers/App.jsx on lines 41..183
src/applications/gi/components/profile/CalculateYourBenefitsForm.jsx on lines 34..1236
src/applications/gi/containers/ProfilePage.jsx on lines 18..123
src/applications/mhv-secure-messaging/components/shared/RouteLeavingGuard.jsx on lines 8..100
src/applications/pact-act/containers/questions/CheckboxGroup.jsx on lines 24..118
src/applications/vaos/components/calendar/CalendarOptionsSlots.jsx on lines 39..146
src/platform/forms-system/src/js/widgets/SelectWidget.jsx on lines 18..71
src/applications/disability-benefits/all-claims/Form526EZApp.jsx on lines 85..250

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

export default function CalendarOptionsSlots({
  availableSlots,
  currentlySelectedDate,
  selectedDates,
  rowSize,
src/applications/appeals/995/containers/App.jsx on lines 41..183
src/applications/appeals/testing/sc/containers/App.jsx on lines 41..183
src/applications/gi/components/profile/CalculateYourBenefitsForm.jsx on lines 34..1236
src/applications/gi/containers/ProfilePage.jsx on lines 18..123
src/applications/gi/containers/search/FilterBeforeResults.jsx on lines 300..888
src/applications/mhv-secure-messaging/components/shared/RouteLeavingGuard.jsx on lines 8..100
src/applications/pact-act/containers/questions/CheckboxGroup.jsx on lines 24..118
src/platform/forms-system/src/js/widgets/SelectWidget.jsx on lines 18..71
src/applications/disability-benefits/all-claims/Form526EZApp.jsx on lines 85..250

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

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

  const localStorageValues = useMemo(() => {
    return {
      atExpires: localStorage.atExpires,
      hasSession: localStorage.hasSession,
      sessionExpiration: localStorage.sessionExpiration,
src/applications/mhv-secure-messaging/components/ComposeForm/ReplyDraftItem.jsx on lines 93..100
src/applications/mhv-secure-messaging/components/shared/SmRouteNavigationGuard.jsx on lines 53..60

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

const CheckboxGroup = ({
  formError,
  formResponses,
  formValue,
  h1,
src/applications/appeals/995/containers/App.jsx on lines 41..183
src/applications/appeals/testing/sc/containers/App.jsx on lines 41..183
src/applications/gi/components/profile/CalculateYourBenefitsForm.jsx on lines 34..1236
src/applications/gi/containers/ProfilePage.jsx on lines 18..123
src/applications/gi/containers/search/FilterBeforeResults.jsx on lines 300..888
src/applications/mhv-secure-messaging/components/shared/RouteLeavingGuard.jsx on lines 8..100
src/applications/vaos/components/calendar/CalendarOptionsSlots.jsx on lines 39..146
src/platform/forms-system/src/js/widgets/SelectWidget.jsx on lines 18..71
src/applications/disability-benefits/all-claims/Form526EZApp.jsx on lines 85..250

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

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

  const localStorageValues = useMemo(() => {
    return {
      atExpires: localStorage.atExpires,
      hasSession: localStorage.hasSession,
      sessionExpiration: localStorage.sessionExpiration,
src/applications/mhv-secure-messaging/components/ComposeForm/ComposeForm.jsx on lines 128..135
src/applications/mhv-secure-messaging/components/shared/SmRouteNavigationGuard.jsx on lines 53..60

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

CreditCardBillsSummaryReview.propTypes = {
  data: PropTypes.shape({
    expenses: PropTypes.shape({
      creditCardBills: PropTypes.array,
    }),
src/applications/financial-status-report/components/householdExpenses/HouseholdExpensesSummaryReview.jsx on lines 32..37
src/applications/financial-status-report/components/otherAssets/OtherAssetsSummaryReview.jsx on lines 30..37
src/applications/financial-status-report/components/otherAssets/RealEstateReview.jsx on lines 26..33
src/applications/financial-status-report/components/otherAssets/RecreationalVehcilesReview.jsx on lines 26..33
src/applications/financial-status-report/components/otherAssets/VehicleSummaryReview.jsx on lines 37..44
src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/ProviderName.jsx on lines 15..22

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

HouseholdExpensesSummaryReview.propTypes = {
  data: PropTypes.shape({
    expenses: PropTypes.shape({ expenseRecords: PropTypes.array }),
  }),
  title: PropTypes.string,
src/applications/financial-status-report/components/householdExpenses/CreditCardBillsSummaryReview.jsx on lines 64..71
src/applications/financial-status-report/components/otherAssets/OtherAssetsSummaryReview.jsx on lines 30..37
src/applications/financial-status-report/components/otherAssets/RealEstateReview.jsx on lines 26..33
src/applications/financial-status-report/components/otherAssets/RecreationalVehcilesReview.jsx on lines 26..33
src/applications/financial-status-report/components/otherAssets/VehicleSummaryReview.jsx on lines 37..44
src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/ProviderName.jsx on lines 15..22

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

OtherAssetsSummaryReview.propTypes = {
  data: PropTypes.shape({
    assets: PropTypes.shape({
      otherAssets: PropTypes.array,
    }),
src/applications/financial-status-report/components/householdExpenses/CreditCardBillsSummaryReview.jsx on lines 64..71
src/applications/financial-status-report/components/householdExpenses/HouseholdExpensesSummaryReview.jsx on lines 32..37
src/applications/financial-status-report/components/otherAssets/RealEstateReview.jsx on lines 26..33
src/applications/financial-status-report/components/otherAssets/RecreationalVehcilesReview.jsx on lines 26..33
src/applications/financial-status-report/components/otherAssets/VehicleSummaryReview.jsx on lines 37..44
src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/ProviderName.jsx on lines 15..22

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

RecreationalVehiclesReview.propTypes = {
  data: PropTypes.shape({
    assets: PropTypes.shape({
      recVehicleAmount: PropTypes.string,
    }),
src/applications/financial-status-report/components/householdExpenses/CreditCardBillsSummaryReview.jsx on lines 64..71
src/applications/financial-status-report/components/householdExpenses/HouseholdExpensesSummaryReview.jsx on lines 32..37
src/applications/financial-status-report/components/otherAssets/OtherAssetsSummaryReview.jsx on lines 30..37
src/applications/financial-status-report/components/otherAssets/RealEstateReview.jsx on lines 26..33
src/applications/financial-status-report/components/otherAssets/VehicleSummaryReview.jsx on lines 37..44
src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/ProviderName.jsx on lines 15..22

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

Severity
Category
Status
Source
Language