department-of-veterans-affairs/vets-website

View on GitHub
src/applications/appeals/995/content/primaryPhone.js

Summary

Maintainability
A
50 mins
Test Coverage

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

export const content = {
  reviewTitle: 'Primary phone number',
  label: 'What is your primary phone number?',
  hint:
    'We may need to contact you to clarify issues related to your Supplemental Claim.',
Severity: Major
Found in src/applications/appeals/995/content/primaryPhone.js and 11 other locations - About 50 mins to fix
src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskOrange/utils/labels.jsx on lines 6..15
src/applications/appeals/testing/sc/content/primaryPhone.js on lines 1..11
src/applications/disability-benefits/686c-674/config/constants.js on lines 7..17
src/applications/disability-benefits/wizard/pages/pageList.js on lines 1..10
src/applications/edu-benefits/utils/labels.jsx on lines 6..15
src/applications/mhv-medical-records/util/constants.js on lines 23..32
src/applications/mhv-secure-messaging/util/constants.js on lines 308..317
src/applications/simple-forms/21-4142/definitions/constants.js on lines 29..38
src/applications/vre/28-1900/wizard/pages/pageList.js on lines 14..23
src/applications/pensions/labels.jsx on lines 32..41
src/applications/static-pages/cta-widget/constants.js on lines 3..12

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

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