saarnilauri/fida-imu

View on GitHub

Showing 75 of 105 total issues

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

const Field = ({ id, ...props }) => (
  <FormElement
    {...props}
    name={id}
    id={id}
Severity: Major
Found in src/components/FormGroupElement/FormFields.js and 1 other location - About 1 hr to fix
src/components/FormElement/FormFields.js on lines 11..18

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

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

const Field = ({ id, ...props }) => (
  <FormElement
    {...props}
    name={id}
    id={id}
Severity: Major
Found in src/components/FormElement/FormFields.js and 1 other location - About 1 hr to fix
src/components/FormGroupElement/FormFields.js on lines 13..20

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

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

Function EntityListView has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const EntityListView = props => {
  const {
    formatMessage,
    data,
    tableColumns,
Severity: Minor
Found in src/components/hoc/EntityListView.js - About 1 hr to fix

Function render has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  render() {
    const modules = {
      toolbar: [
        ['bold', 'italic', 'underline', { header: 1 }],
        [{ list: 'ordered' }, { list: 'bullet' }],
Severity: Minor
Found in src/components/QuillEditor/index.js - About 1 hr to fix

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

    <Field
      className="py-2"
      id="passwordTwo"
      label="Confirm password"
      value={passwordTwo}
Severity: Major
Found in src/components/FormGroupElement/FormFields.js and 1 other location - About 1 hr to fix
src/components/FormGroupElement/FormFields.js on lines 79..88

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

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

    <Field
      className=""
      id="passwordOne"
      label="Password"
      value={passwordOne}
Severity: Major
Found in src/components/FormGroupElement/FormFields.js and 1 other location - About 1 hr to fix
src/components/FormGroupElement/FormFields.js on lines 89..98

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

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

Function getEntitySelect has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const getEntitySelect = entity => {
  class EntitySelect extends Component {
    render() {
      const { ready, data, onChange, value } = this.props
      const { formatMessage } = this.props.intl
Severity: Minor
Found in src/components/hoc/getEntitySelect.js - About 1 hr to fix

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

CountryList.propTypes = {
  data: PropTypes.array,
  intl: PropTypes.object,
  loadCountries: PropTypes.func,
  ready: PropTypes.bool,
Severity: Major
Found in src/components/Country/List/index.js and 3 other locations - About 1 hr to fix
src/components/Country/List/Page.js on lines 150..157
src/components/User/List/index.js on lines 92..99
src/components/User/Login/Form/index.js on lines 35..42

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

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

LoginForm.propTypes = {
  email: PropTypes.string,
  password: PropTypes.string,
  isInvalid: PropTypes.bool,
  onChangeEmail: PropTypes.func,
Severity: Major
Found in src/components/User/Login/Form/index.js and 3 other locations - About 1 hr to fix
src/components/Country/List/Page.js on lines 150..157
src/components/Country/List/index.js on lines 121..128
src/components/User/List/index.js on lines 92..99

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

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

CountryListPage.propTypes = {
  addCountry: PropTypes.func,
  data: PropTypes.array,
  intl: PropTypes.object,
  loadCountries: PropTypes.func,
Severity: Major
Found in src/components/Country/List/Page.js and 3 other locations - About 1 hr to fix
src/components/Country/List/index.js on lines 121..128
src/components/User/List/index.js on lines 92..99
src/components/User/Login/Form/index.js on lines 35..42

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

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

UserList.propTypes = {
  data: PropTypes.array,
  ready: PropTypes.bool,
  intl: PropTypes.object,
  loadUsers: PropTypes.func,
Severity: Major
Found in src/components/User/List/index.js and 3 other locations - About 1 hr to fix
src/components/Country/List/Page.js on lines 150..157
src/components/Country/List/index.js on lines 121..128
src/components/User/Login/Form/index.js on lines 35..42

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

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

Function withEntities has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const withEntities = entity => WrappedComponent => {
  const wordForms = getWordForms(entity)
  const loadEntities = getLoadEntityCollectionActionCreator(entity)

  const mapDispatchToProps = dispatch => ({
Severity: Minor
Found in src/components/hoc/withEntities.js - About 1 hr to fix

Function LandingPage has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const LandingPage = () => {
  return (
    <React.Fragment>
      <div className="landing-bg">
        <Row className="full-height d-flex justify-content-center align-items-center">
Severity: Minor
Found in src/components/Landing/index.js - About 1 hr to fix

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

        <Col xs="6" className="text-right">
          <Link className="px-0" to={props.forgotPasswordRoute}>
            <FormattedMessage id="app.login.form.forgot-pwd" />
          </Link>
        </Col>
Severity: Major
Found in src/components/User/Login/Form/index.js and 1 other location - About 1 hr to fix
src/components/User/PasswordForget/index.js on lines 92..96

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

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

          <Col xs="6" className="text-right">
            <Link className="px-0" to={routes.SIGN_IN}>
              <FormattedMessage id="app.pwd-forgot.login" />
            </Link>
          </Col>
Severity: Major
Found in src/components/User/PasswordForget/index.js and 1 other location - About 1 hr to fix
src/components/User/Login/Form/index.js on lines 25..29

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

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

Function LanguageMenu has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const LanguageMenu = props => {
  const { setLocale, history } = props
  return (
    <AppHeaderDropdown direction="down">
      <DropdownToggle nav>
Severity: Minor
Found in src/components/LanguageSwitch/Menu.js - About 1 hr to fix

Function AccountPage has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const AccountPage = props => {
  const ImageDropZone = getEntityImageDropZone(
    'user',
    false,
    props.authUser.uid,
Severity: Minor
Found in src/components/Account/index.js - About 1 hr to fix

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

            <CardBody>
              <ItemToMeasure
                contentHeight={this.props.topContentHeight}
                onResize={this.props.onResizeTop}
              >
Severity: Major
Found in src/components/ResultsChain/Column/index.js and 2 other locations - About 1 hr to fix
src/components/ResultsChain/Column/index.js on lines 81..88
src/components/ResultsChain/Column/index.js on lines 96..103

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

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

              <div style={{ height: this.props.botContentHeight }}>
                <ItemToMeasure
                  contentHeight={this.props.botContentHeight}
                  onResize={this.props.onResizeBot}
                >
Severity: Major
Found in src/components/ResultsChain/Column/index.js and 2 other locations - About 1 hr to fix
src/components/ResultsChain/Column/index.js on lines 67..74
src/components/ResultsChain/Column/index.js on lines 81..88

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

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

            <CardBody className="small-padding">
              <ItemToMeasure
                contentHeight={this.props.midContentHeight}
                onResize={this.props.onResizeMid}
              >
Severity: Major
Found in src/components/ResultsChain/Column/index.js and 2 other locations - About 1 hr to fix
src/components/ResultsChain/Column/index.js on lines 67..74
src/components/ResultsChain/Column/index.js on lines 96..103

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

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

Severity
Category
Status
Source
Language