myems-web/src/components/bootstrap-components/Forms.js

Summary

Maintainability
F
3 days
Test Coverage

File Forms.js has 575 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { Fragment } from 'react';
import { Button, Card, CardBody, Col, Row } from 'reactstrap';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import FalconCardHeader from '../common/FalconCardHeader';
import FalconEditor from '../common/FalconEditor';
Severity: Major
Found in myems-web/src/components/bootstrap-components/Forms.js - About 1 day to fix

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

          <Col lg={6} className="pr-lg-2 mb-3">
            <Card className="h-100">
              <FalconCardHeader title="Inline Radios" light={false} />
              <CardBody className="bg-light">
                <FalconEditor code={InlineRadioCode} scope={{ Flex }} />
    Severity: Major
    Found in myems-web/src/components/bootstrap-components/Forms.js and 2 other locations - About 3 hrs to fix
    myems-web/src/components/bootstrap-components/Avatar.js on lines 154..161
    myems-web/src/components/bootstrap-components/Avatar.js on lines 162..169

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

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

          <Col lg={6} className="pl-lg-2 mb-3">
            <Card className="h-100">
              <FalconCardHeader title="Radios" light={false} />
              <CardBody className="bg-light">
                <FalconEditor code={customRadioCode} language="jsx" />
    Severity: Major
    Found in myems-web/src/components/bootstrap-components/Forms.js and 4 other locations - About 3 hrs to fix
    myems-web/src/components/bootstrap-components/Forms.js on lines 526..533
    myems-web/src/components/bootstrap-components/Forms.js on lines 550..557
    myems-web/src/components/bootstrap-components/Forms.js on lines 566..573
    myems-web/src/components/bootstrap-components/Forms.js on lines 574..581

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

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

          <Col lg={6} className="pr-lg-2">
            <Card className="h-100">
              <FalconCardHeader title="Custom Select" light={false} />
              <CardBody className="bg-light">
                <FalconEditor code={customSelectCode} language="jsx" />
    Severity: Major
    Found in myems-web/src/components/bootstrap-components/Forms.js and 4 other locations - About 3 hrs to fix
    myems-web/src/components/bootstrap-components/Forms.js on lines 526..533
    myems-web/src/components/bootstrap-components/Forms.js on lines 534..541
    myems-web/src/components/bootstrap-components/Forms.js on lines 550..557
    myems-web/src/components/bootstrap-components/Forms.js on lines 566..573

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

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

          <Col lg={6} className="pl-lg-2 mb-3">
            <Card className="h-100">
              <FalconCardHeader title="Disabled" light={false} />
              <CardBody className="bg-light">
                <FalconEditor code={disabledInputFieldsCode} language="jsx" />
    Severity: Major
    Found in myems-web/src/components/bootstrap-components/Forms.js and 4 other locations - About 3 hrs to fix
    myems-web/src/components/bootstrap-components/Forms.js on lines 526..533
    myems-web/src/components/bootstrap-components/Forms.js on lines 534..541
    myems-web/src/components/bootstrap-components/Forms.js on lines 566..573
    myems-web/src/components/bootstrap-components/Forms.js on lines 574..581

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

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

          <Col lg={6} className="pr-lg-2 mb-3">
            <Card className="h-100 mb-2">
              <FalconCardHeader title="Checkboxes" light={false} />
              <CardBody className="bg-light">
                <FalconEditor code={customCheckboxCode} language="jsx" />
    Severity: Major
    Found in myems-web/src/components/bootstrap-components/Forms.js and 4 other locations - About 3 hrs to fix
    myems-web/src/components/bootstrap-components/Forms.js on lines 534..541
    myems-web/src/components/bootstrap-components/Forms.js on lines 550..557
    myems-web/src/components/bootstrap-components/Forms.js on lines 566..573
    myems-web/src/components/bootstrap-components/Forms.js on lines 574..581

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

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

          <Col lg={6} className="pl-lg-2 mb-3">
            <Card className="h-100">
              <FalconCardHeader title="Disabled Switches" light={false} />
              <CardBody className="bg-light">
                <FalconEditor code={customSwitchDisabledCode} language="jsx" />
    Severity: Major
    Found in myems-web/src/components/bootstrap-components/Forms.js and 4 other locations - About 3 hrs to fix
    myems-web/src/components/bootstrap-components/Forms.js on lines 526..533
    myems-web/src/components/bootstrap-components/Forms.js on lines 534..541
    myems-web/src/components/bootstrap-components/Forms.js on lines 550..557
    myems-web/src/components/bootstrap-components/Forms.js on lines 574..581

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

    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