Showing 12,759 of 12,759 total issues
Function transformForSubmit
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function transformForSubmit(formConfig, form) {
const remarksFormData = form.data.remarks;
const remarksUiSchema =
formConfig.chapters.additionalInformationChapter.pages.remarks.uiSchema;
Function calculateExpenses
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
const calculateExpenses = async () => {
if (!gmtData?.isEligibleForStreamlined) return;
try {
const response = await getMonthlyExpensesAPI(data);
Function calculateExpenses
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
const calculateExpenses = async () => {
if (!otherExpenses?.length || !gmtData?.isEligibleForStreamlined) return;
try {
const response = await getMonthlyExpensesAPI(data);
Function content
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
const content = () => {
if (replyMessage === undefined) {
return (
<va-loading-indicator
message="Loading your secure message..."
Function transformFormToAppointment
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function transformFormToAppointment(state) {
const clinic = getChosenClinicInfo(state);
const data = selectCovid19VaccineFormData(state);
const slot = getChosenSlot(state);
Function ScheduleNewAppointmentButton
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ScheduleNewAppointmentButton() {
const history = useHistory();
const dispatch = useDispatch();
const { typeOfCare } = useSelector(getNewAppointmentFlow);
const featureStartSchedulingLink = useSelector(
Function enter
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
enter(path) {
if (isBlock(path)) {
const parent = stack[stack.length - 1];
const block = {
type: !parent ? 'Feature' : 'Background',
Function renderErrorMessages
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderErrorMessages() {
const {
claimsLoading,
appealsLoading,
stemClaimsLoading,
Function makeLoadedCards
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
const makeLoadedCards = () => {
setLoadedCards(
loaded.map((facilityCode, index) => {
return (
<li
Function default
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(state = INITIAL_STATE, action) {
switch (action.type) {
case FETCH_CONSTANTS_STARTED:
return {
...state,
Function disclaimerText
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
const disclaimerText = () => {
return (
<>
<div>
<p>
Function deleteConnectedApp
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function deleteConnectedApp(appId) {
return async (dispatch, getState) => {
recordEvent({ event: 'profile-disconnect-connected-app-started' });
dispatch({ type: DELETING_CONNECTED_APP, appId });
Function vaProfile
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function vaProfile(state = initialState, action) {
switch (action.type) {
case FETCH_HERO_SUCCESS:
case FETCH_HERO_FAILED:
return set('hero', action.hero, state);
Function ClaimantType
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ClaimantType = props => {
const { router, setFormData } = props;
const { data: formData } = useSelector(state => state.form);
const [localData, setLocalData] = useState({});
Similar blocks of code found in 5 locations. Consider refactoring. Open
export const maxNameLength = (errors, data) => {
if (data.length > MAX_LENGTH.NOD_ISSUE_NAME) {
errors.addError(errorMessages.maxLength(MAX_LENGTH.NOD_ISSUE_NAME));
}
};
- 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 59.
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 5 locations. Consider refactoring. Open
export const maxNameLength = (error, data) => {
if (data.length > MAX_LENGTH.ISSUE_NAME) {
error.addError(errorMessages.maxLength(MAX_LENGTH.ISSUE_NAME));
}
};
- 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 59.
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 5 locations. Consider refactoring. Open
export const maxNameLength = (errors, data) => {
if (data.length > MAX_LENGTH.ISSUE_NAME) {
errors.addError(errorMessages.maxLength(MAX_LENGTH.ISSUE_NAME));
}
};
- 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 59.
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 5 locations. Consider refactoring. Open
export const maxNameLength = (errors, data) => {
if (data.length > MAX_LENGTH.ISSUE_NAME) {
errors.addError(errorMessages.maxLength(MAX_LENGTH.ISSUE_NAME));
}
};
- 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 59.
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 5 locations. Consider refactoring. Open
export const maxNameLength = (error, data) => {
if (data.length > MAX_LENGTH.ISSUE_NAME) {
error.addError(errorMessages.maxLength(MAX_LENGTH.ISSUE_NAME));
}
};
- 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 59.
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
Identical blocks of code found in 2 locations. Consider refactoring. Open
evidenceVaRecords: {
title: 'VA medical records',
path: EVIDENCE_VA_PATH,
depends: hasVAEvidence,
CustomPage: EvidenceVaRecords,
- 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 59.
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