Showing 12,851 of 12,851 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
const inProgressClaims = [
...claimsV2Root.appeals,
...claimsV2Root.claims,
...stemClaims,
]
- Read upRead up
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 72.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
[`ptsdAdditionalEvents${index}`]: {
title: 'Add another event or situation?',
path: `disabilities/ptsd-additional-events-${index}`,
depends: isAnswering781Questions(index),
uiSchema: ptsdAdditionalEvents.uiSchema(index),
- Read upRead up
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 72.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
const profileToggles = {
authExpVbaDowntimeMessage: false,
profileShowPronounsAndSexualOrientation: false,
profileHideDirectDeposit: false,
profileShowPaymentsNotificationSetting: false,
- Read upRead up
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 72.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
() => {
if (
!isInitialLoad &&
!loadingSlots &&
appointmentSlotsStatus !== FETCH_STATUS.failed
- Read upRead up
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 72.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
const {
address: applicantAddress,
applicantEmail,
educationDetails,
fullName,
- Read upRead up
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 72.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
<p>
We’re working to bring your medical records to VA.gov. For
now, you can download your records using the previous
version of My HealtheVet.{' '}
<a
- Read upRead up
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 72.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (fragmentAfter.childNodes.length > 0) {
const newUlAfter = document.createElement('ul');
while (fragmentAfter.firstChild) {
newUlAfter.appendChild(fragmentAfter.firstChild);
}
- Read upRead up
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 72.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function sortFunc
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
const sortFunc = (a, b) => {
if (sortField === 'SENT_DATE') {
if (sortOrder === 'DESC') {
return compareDesc(
new Date(a.attributes.sentDate),
Function ClientError
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function ClientError(props) {
const { buttonText, formConfig, onBack, onSubmit, testId } = props;
const { Element } = Scroll;
const scrollToError = () => {
scrollTo('errorScrollElement', getScrollOptions());
Function ValidationError
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ValidationError(props) {
const { appType, buttonText, formConfig, onBack, onSubmit, testId } = props;
let ariaDescribedBy = null;
// If no ariaDescribedBy is passed down from form.js,
// a null value will properly not render the aria label.
Function ConfirmationPage
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const ConfirmationPage = () => {
resetStoredSubTask();
return (
<ConfirmationDecisionReviews
Function GET /covid_vaccine/v0/facilities/:zip
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
'GET /covid_vaccine/v0/facilities/:zip': (req, res) => {
return res.status(200).json({
data: [
{
id: 'vha_516',
Function benefitsEligibilityUpdate
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const benefitsEligibilityUpdate = benefitsEligibilityBox => {
const uiSchema = {
'ui:description': benefitsEligibilityBox,
'view:selectedBenefits': {
'ui:title': 'Select the benefit that is the best match for you.',
Function render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { form } = this.props;
const { formId, data, submission } = form;
const submitDate = new Date(submission?.timestamp);
Function render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { form } = this.props;
const { submission, formId, data } = form;
const submitDate = new Date(submission?.timestamp);
const { fullName } = data;
Function combineEnrollmentsWithStartMonth
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const combineEnrollmentsWithStartMonth = enrollmentPeriods => {
const isArray = Array.isArray(enrollmentPeriods);
const trackDate = [];
const combineMonths = {};
Function getCards
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getCards = () => {
const combinedEnrollmentsObj = combineEnrollmentsWithStartMonth(
enrollmentPeriods,
);
const combinedEnrollmentsValues = Object.values(
Function genSearchAreaFromCenter
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const genSearchAreaFromCenter = query => {
const { lat, lng, currentBounds } = query;
return dispatch => {
const types = MAPBOX_QUERY_TYPES;
mbxClient
Function appointments
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
const appointments = avs => {
if (avs.appointments?.length > 0) {
const scheduledAppointments = getAppointmentContent(
APPOINTMENT_TYPES.SCHEDULED,
avs.appointments,
Function createFutureEvents
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
const createFutureEvents = () => {
// Types: upcoming, next-month, next-week
return [
// upcoming
createEvent(