Showing 12,844 of 12,844 total issues
Function YourAppointment
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
const YourAppointment = props => {
const { avs } = props;
return (
<div className="avs-accordion-item">
Function FinancialConfirmation
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
const FinancialConfirmation = props => {
const { goBack, goForward } = props;
return (
<va-alert
Function createRecurringEvents
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
const createRecurringEvents = () => {
const recurEventData = { id: 'upcoming' };
const eventA = createEvent(
now
.clone()
Function render
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { form } = this.props;
const { submission, formId, data } = form;
const submitDate = submission ? submission.timestamp : null;
const { fullName } = data;
Function generateMedicalCentersSchemas
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const generateMedicalCentersSchemas = (
medicalCentersKey = 'medicalCenters',
medicalCentersTitle = 'Default Medical Centers Title',
medicalCenterMessage = 'Default Message',
medicalCenterFieldLabel = 'Default Field Label',
Function App
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
const App = props => {
const { location, children } = props;
const { data: formData } = useSelector(state => state.form);
const { isLoadingFeatureFlags: loading, useFacilitiesApi } = useSelector(
selectFeatureToggles,
Function FormApp
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function FormApp(props) {
const {
children,
hasSavedForm,
isLoading,
Function WizardContainer
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
const WizardContainer = props => {
const { setWizardStatus } = props;
useEffect(() => {
focusElement('.va-nav-breadcrumbs-list');
}, []);
Function VeteranInformationViewComponent
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
const VeteranInformationViewComponent = props => {
const { profile } = props;
const {
gender,
dob,
Function threadsReducer
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const threadsReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.Thread.GET_LIST:
return {
...state,
Function openFacilityPage
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function openFacilityPage() {
return async (dispatch, getState) => {
try {
const initialState = getState();
const newBooking = selectCovid19VaccineNewBooking(initialState);
Function getBreadcrumbList
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getBreadcrumbList = () => {
const isPast = location.pathname.includes('/past');
const isPending = location.pathname.includes('/pending');
const BREADCRUMB_BASE = [
Function getICSTokens
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function getICSTokens(buffer) {
const map = new Map();
let tokens = buffer.split('\r\n');
// Split tokens into key/value pairs using lookbehind since it is possible
Function getGridData
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getGridData(appointment) {
const { isCommunityCare, isVideo } = appointment?.vaos || {};
const isPhone = isVAPhoneAppointment(appointment);
const { serviceType } = appointment?.vaos.apiData || {};
Function verifyDependents
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function verifyDependents(state = initialState, action) {
switch (action.type) {
case DEPENDENCY_VERIFICATION_CALL_SUCCESS:
return {
...state,
Function buildMedicationInformationPDF
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const buildMedicationInformationPDF = list => {
const listOfHeaders = ['h2', 'h3'];
const sections = [
...list
.filter(listItem => listOfHeaders.includes(listItem.type))
Identical blocks of code found in 4 locations. Consider refactoring. Open
IntroductionPage.propTypes = {
route: PropTypes.shape({
formConfig: PropTypes.shape({
prefillEnabled: PropTypes.bool,
savedFormMessages: PropTypes.shape({}),
- 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
Identical blocks of code found in 4 locations. Consider refactoring. Open
IntroductionPage.propTypes = {
route: PropTypes.shape({
formConfig: PropTypes.shape({
prefillEnabled: PropTypes.bool,
savedFormMessages: PropTypes.shape({}),
- 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
Identical blocks of code found in 4 locations. Consider refactoring. Open
IntroductionPage.propTypes = {
route: PropTypes.shape({
formConfig: PropTypes.shape({
prefillEnabled: PropTypes.bool,
savedFormMessages: PropTypes.shape({}),
- 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
Identical blocks of code found in 4 locations. Consider refactoring. Open
IntroductionPage.propTypes = {
route: PropTypes.shape({
formConfig: PropTypes.shape({
prefillEnabled: PropTypes.bool,
savedFormMessages: PropTypes.shape({}),
- 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