binary-com/binary-next-gen

View on GitHub

Showing 551 of 551 total issues

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

    it('should not render create account table when upgradeInfo has canUpgrade equal to false', () => {
        const loginid = '';
        const account = {};
        const markets = [];
        const nextAccountTitle = '';
Severity: Major
Found in src/user-accounts/__tests__/createNewAccount-test.js and 1 other location - About 5 hrs to fix
src/user-accounts/__tests__/createNewAccount-test.js on lines 22..40

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

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

File UpgradeCard.options.js has 404 lines of code (exceeds 250 allowed). Consider refactoring.
Open

export default {
    salutationOptions: [
      {
        value: '',
        text: 'Please select',
Severity: Minor
Found in src/upgrade/UpgradeCard.options.js - About 5 hrs to fix

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

      it('Timeout until date should be after moment', () => {
        const wrapper = mountWithIntl(<SettingsSelfExclusion />);
        const timeoutUntilDate = wrapper.find('#timeout_until_date').hostNodes();
        timeoutUntilDate.instance().value = dateFormat(moment().subtract(1, 'days'));
        wrapper.update();
    Severity: Major
    Found in src/settings/__tests__/settingsSelfExclusion-test.js and 1 other location - About 5 hrs to fix
    src/settings/__tests__/settingsSelfExclusion-test.js on lines 141..150

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

    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

      it('Timeout until time should be required when timeout until date is filled', () => {
        const wrapper = mountWithIntl(<SettingsSelfExclusion />);
        const timeoutUntilDate = wrapper.find('#timeout_until_date').hostNodes();
        timeoutUntilDate.instance().value = dateFormat(moment().add(1, 'days'));
        wrapper.update();
    Severity: Major
    Found in src/settings/__tests__/settingsSelfExclusion-test.js and 1 other location - About 5 hrs to fix
    src/settings/__tests__/settingsSelfExclusion-test.js on lines 81..90

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

    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 render has 131 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      render() {
        const { formData, success, serverError, errors } = this.state;
        return (
          <div className="settings-self-exclusion">
            <form onSubmit={this.onFormSubmit}>
    Severity: Major
    Found in src/settings/SettingsSelfExclusion.js - About 5 hrs to fix

      File redux-saga_v0.11.x.js has 381 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // flow-typed signature: 49be8ddf10387180033fd58b9175b67d
      // flow-typed version: c5c02016d4/redux-saga_v0.11.x/flow_>=v0.28.x
      
      /* @flow */
      
      
      Severity: Minor
      Found in flow-typed/npm/redux-saga_v0.11.x.js - About 5 hrs to fix

        Function initAuthorized has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
        Open

        const initAuthorized = async (authData, store) => {
            if (/japan/.test(authData.authorize.landing_company_name)) {
                showError('Sorry, for japan user please login through www.binary.com ');
                store.dispatch(actions.updateAppState('authorized', false));
                store.dispatch(actions.updateToken(''));
        Severity: Minor
        Found in src/_data/LiveData.js - About 4 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

          it('First name should have error when input is not valid', () => {
            const wrapper = mountWithIntl(<UpgradeToRealCard {...PROPS} />);
            const firstName = wrapper.find('#first_name').hostNodes();
            firstName.instance().value = 'abcd#$';
            wrapper.update();
        Severity: Major
        Found in src/upgrade/__tests__/upgradeToRealCard-test.js and 5 other locations - About 4 hrs to fix
        src/settings/__tests__/settingsUserInformation-test.js on lines 49..58
        src/settings/__tests__/settingsUserInformation-test.js on lines 82..91
        src/settings/__tests__/settingsUserInformation-test.js on lines 104..113
        src/settings/__tests__/settingsUserInformation-test.js on lines 126..135
        src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 73..82

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

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

          it('address line 1 should not be valid when format is not valid', () => {
            const wrapper = mountWithIntl(<SettingsUserInformation {...PROPS} />);
            const addressLine1 = wrapper.find('#address_line_1').hostNodes();
            addressLine1.instance().value = 'test " test';
            wrapper.update();
        Severity: Major
        Found in src/settings/__tests__/settingsUserInformation-test.js and 5 other locations - About 4 hrs to fix
        src/settings/__tests__/settingsUserInformation-test.js on lines 82..91
        src/settings/__tests__/settingsUserInformation-test.js on lines 104..113
        src/settings/__tests__/settingsUserInformation-test.js on lines 126..135
        src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 73..82
        src/upgrade/__tests__/upgradeToRealCard-test.js on lines 73..82

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

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

          it('First name should have error when input is not valid', () => {
            const wrapper = mountWithIntl(<UpgradeToMaltainvestCard {...PROPS} />);
            const firstName = wrapper.find('#first_name').hostNodes();
            firstName.instance().value = 'abcd#$';
            wrapper.update();
        Severity: Major
        Found in src/upgrade/__tests__/upgradeToMaltainvestCard-test.js and 5 other locations - About 4 hrs to fix
        src/settings/__tests__/settingsUserInformation-test.js on lines 49..58
        src/settings/__tests__/settingsUserInformation-test.js on lines 82..91
        src/settings/__tests__/settingsUserInformation-test.js on lines 104..113
        src/settings/__tests__/settingsUserInformation-test.js on lines 126..135
        src/upgrade/__tests__/upgradeToRealCard-test.js on lines 73..82

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

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

          it('address city should not be valid when format is not valid', () => {
            const wrapper = mountWithIntl(<SettingsUserInformation {...PROPS} />);
            const addressCity = wrapper.find('#address_city').hostNodes();
            addressCity.instance().value = 'test " test';
            wrapper.update();
        Severity: Major
        Found in src/settings/__tests__/settingsUserInformation-test.js and 5 other locations - About 4 hrs to fix
        src/settings/__tests__/settingsUserInformation-test.js on lines 49..58
        src/settings/__tests__/settingsUserInformation-test.js on lines 104..113
        src/settings/__tests__/settingsUserInformation-test.js on lines 126..135
        src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 73..82
        src/upgrade/__tests__/upgradeToRealCard-test.js on lines 73..82

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

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

          it('address city should not be valid when format is not valid', () => {
            const wrapper = mountWithIntl(<SettingsUserInformation {...PROPS} />);
            const addressPostCode = wrapper.find('#address_postcode').hostNodes();
            addressPostCode.instance().value = 'test " test';
            wrapper.update();
        Severity: Major
        Found in src/settings/__tests__/settingsUserInformation-test.js and 5 other locations - About 4 hrs to fix
        src/settings/__tests__/settingsUserInformation-test.js on lines 49..58
        src/settings/__tests__/settingsUserInformation-test.js on lines 82..91
        src/settings/__tests__/settingsUserInformation-test.js on lines 126..135
        src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 73..82
        src/upgrade/__tests__/upgradeToRealCard-test.js on lines 73..82

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

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

          it('phone should not be valid when format is not valid', () => {
            const wrapper = mountWithIntl(<SettingsUserInformation {...PROPS} />);
            const phone = wrapper.find('#phone').hostNodes();
            phone.instance().value = 'test 123';
            wrapper.update();
        Severity: Major
        Found in src/settings/__tests__/settingsUserInformation-test.js and 5 other locations - About 4 hrs to fix
        src/settings/__tests__/settingsUserInformation-test.js on lines 49..58
        src/settings/__tests__/settingsUserInformation-test.js on lines 82..91
        src/settings/__tests__/settingsUserInformation-test.js on lines 104..113
        src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 73..82
        src/upgrade/__tests__/upgradeToRealCard-test.js on lines 73..82

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

        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

                case UPDATE_CHART_DATA_BY_SYMBOL: {
                    const { symbol, data, dataType } = action;
                    if (dataType !== 'candles') {
                        return state;
                    }
        Severity: Major
        Found in src/_reducers/OHLCReducer.js and 1 other location - About 4 hrs to fix
        src/_reducers/TickReducer.js on lines 71..82

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

        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

                case UPDATE_CHART_DATA_BY_SYMBOL: {
                    const { symbol, data, dataType } = action;
                    if (dataType !== 'ticks') {
                        return state;
                    }
        Severity: Major
        Found in src/_reducers/TickReducer.js and 1 other location - About 4 hrs to fix
        src/_reducers/OHLCReducer.js on lines 74..85

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

        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

        File UpgradeToRealCard.js has 364 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import React, { PureComponent } from 'react';
        import moment from 'moment';
        import {
            M, InputGroup, SelectGroup, LogoSpinner, Legend, Button,
            ErrorMsg, ServerErrorMsg, Countries
        Severity: Minor
        Found in src/upgrade/UpgradeToRealCard.js - About 4 hrs to fix

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

            it('First name should be valid when input is valid', () => {
              const wrapper = mountWithIntl(<UpgradeToRealCard {...PROPS} />);
              const firstName = wrapper.find('#first_name').hostNodes();
              firstName.instance().value = 'abcdefg';
              wrapper.update();
          Severity: Major
          Found in src/upgrade/__tests__/upgradeToRealCard-test.js and 5 other locations - About 4 hrs to fix
          src/settings/__tests__/settingsUserInformation-test.js on lines 38..47
          src/settings/__tests__/settingsUserInformation-test.js on lines 71..80
          src/settings/__tests__/settingsUserInformation-test.js on lines 93..102
          src/settings/__tests__/settingsUserInformation-test.js on lines 115..124
          src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 62..71

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

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

            it('address city should be valid when format is valid', () => {
              const wrapper = mountWithIntl(<SettingsUserInformation {...PROPS} />);
              const addressPostCode = wrapper.find('#address_postcode').hostNodes();
              addressPostCode.instance().value = 'test 123 test';
              wrapper.update();
          Severity: Major
          Found in src/settings/__tests__/settingsUserInformation-test.js and 5 other locations - About 4 hrs to fix
          src/settings/__tests__/settingsUserInformation-test.js on lines 38..47
          src/settings/__tests__/settingsUserInformation-test.js on lines 71..80
          src/settings/__tests__/settingsUserInformation-test.js on lines 115..124
          src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 62..71
          src/upgrade/__tests__/upgradeToRealCard-test.js on lines 62..71

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

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

            it('First name should be valid when input is valid', () => {
              const wrapper = mountWithIntl(<UpgradeToMaltainvestCard {...PROPS} />);
              const firstName = wrapper.find('#first_name').hostNodes();
              firstName.instance().value = 'abcdefg';
              wrapper.update();
          Severity: Major
          Found in src/upgrade/__tests__/upgradeToMaltainvestCard-test.js and 5 other locations - About 4 hrs to fix
          src/settings/__tests__/settingsUserInformation-test.js on lines 38..47
          src/settings/__tests__/settingsUserInformation-test.js on lines 71..80
          src/settings/__tests__/settingsUserInformation-test.js on lines 93..102
          src/settings/__tests__/settingsUserInformation-test.js on lines 115..124
          src/upgrade/__tests__/upgradeToRealCard-test.js on lines 62..71

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

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

            it('address line 1 should be valid when format is valid', () => {
              const wrapper = mountWithIntl(<SettingsUserInformation {...PROPS} />);
              const addressLine1 = wrapper.find('#address_line_1').hostNodes();
              addressLine1.instance().value = 'test 123 test';
              wrapper.update();
          Severity: Major
          Found in src/settings/__tests__/settingsUserInformation-test.js and 5 other locations - About 4 hrs to fix
          src/settings/__tests__/settingsUserInformation-test.js on lines 71..80
          src/settings/__tests__/settingsUserInformation-test.js on lines 93..102
          src/settings/__tests__/settingsUserInformation-test.js on lines 115..124
          src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 62..71
          src/upgrade/__tests__/upgradeToRealCard-test.js on lines 62..71

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

          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