AugurProject/augur-ui

View on GitHub

Showing 1,757 of 1,757 total issues

Avoid too many return statements within this function.
Open

  return true;
Severity: Major
Found in src/modules/auth/helpers/is-global-web3.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

      return createBigNumber(value).toNumber();
    Severity: Major
    Found in src/modules/reports/helpers/progress-calculations.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return 90;
      Severity: Major
      Found in src/modules/transactions/actions/add-transactions.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return MALFORMED_OUTCOME;
        Severity: Major
        Found in src/utils/calculate-payout-numerators-value.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              return 100;
          Severity: Major
          Found in src/modules/transactions/actions/add-transactions.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                if (transaction.status === SUCCESS) return SUCCESS;
            Severity: Major
            Found in src/modules/transactions/selectors/transactions.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return { ...pendingLiquidityOrders };
              Severity: Major
              Found in src/modules/orders/reducers/liquidity-orders.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return p;
                Severity: Major
                Found in src/modules/transactions/selectors/transactions.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                    return firstTrade.type;
                  Severity: Major
                  Found in src/modules/markets/selectors/select-market-outcome-trading-indicator.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                          return {
                            ...marketsData,
                            [marketId]: {
                              ...marketsData[marketId],
                              ethBalance
                    Severity: Major
                    Found in src/modules/markets/reducers/markets-data.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                            if (!marketId) return marketsData;
                      Severity: Major
                      Found in src/modules/markets/reducers/markets-data.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return p;
                        Severity: Major
                        Found in src/modules/markets/reducers/outcomes-data.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                if (!marketId) return marketsData;
                          Severity: Major
                          Found in src/modules/markets/reducers/markets-data.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                  return {
                                    ...marketsData,
                                    [marketId]: {
                                      ...marketsData[marketId],
                                      frozenSharesValue
                            Severity: Major
                            Found in src/modules/markets/reducers/markets-data.js - About 30 mins to fix

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

                                    augurOnSpy = jest
                                      .spyOn(augurjs.augur.events.nodes.augur, "on")
                                      .mockImplementation(() => {});
                              Severity: Major
                              Found in src/modules/events/actions/listen-to-updates.test.js and 7 other locations - About 30 mins to fix
                              src/modules/events/actions/listen-to-updates.test.js on lines 171..173
                              src/modules/events/actions/listen-to-updates.test.js on lines 174..176
                              src/modules/events/actions/listen-to-updates.test.js on lines 278..280
                              src/modules/events/actions/listen-to-updates.test.js on lines 281..283
                              src/modules/events/actions/listen-to-updates.test.js on lines 406..408
                              src/modules/events/actions/listen-to-updates.test.js on lines 409..411
                              src/modules/events/actions/listen-to-updates.test.js on lines 505..507

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

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

                                    ethereumOnSpy = jest
                                      .spyOn(augurjs.augur.events.nodes.ethereum, "on")
                                      .mockImplementation(() => {});
                              Severity: Major
                              Found in src/modules/events/actions/listen-to-updates.test.js and 7 other locations - About 30 mins to fix
                              src/modules/events/actions/listen-to-updates.test.js on lines 171..173
                              src/modules/events/actions/listen-to-updates.test.js on lines 174..176
                              src/modules/events/actions/listen-to-updates.test.js on lines 278..280
                              src/modules/events/actions/listen-to-updates.test.js on lines 281..283
                              src/modules/events/actions/listen-to-updates.test.js on lines 406..408
                              src/modules/events/actions/listen-to-updates.test.js on lines 502..504
                              src/modules/events/actions/listen-to-updates.test.js on lines 505..507

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

                              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

                                static propTypes = {
                                  universe: PropTypes.string.isRequired,
                                  getUniverses: PropTypes.func.isRequired,
                                  switchUniverse: PropTypes.func.isRequired
                                };
                              src/modules/account/components/account-deposit/account-deposit.jsx on lines 43..47
                              src/modules/market/components/market-outstanding-returns/market-outstanding-returns.jsx on lines 7..11
                              src/modules/market/components/market-positions-list--mobile/market-positions-list--mobile.jsx on lines 13..17
                              src/modules/modal/components/modal-participate.jsx on lines 15..19

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

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

                                    augurOnSpy = jest
                                      .spyOn(augurjs.augur.events.nodes.augur, "on")
                                      .mockImplementation(() => {});
                              Severity: Major
                              Found in src/modules/events/actions/listen-to-updates.test.js and 7 other locations - About 30 mins to fix
                              src/modules/events/actions/listen-to-updates.test.js on lines 171..173
                              src/modules/events/actions/listen-to-updates.test.js on lines 174..176
                              src/modules/events/actions/listen-to-updates.test.js on lines 278..280
                              src/modules/events/actions/listen-to-updates.test.js on lines 281..283
                              src/modules/events/actions/listen-to-updates.test.js on lines 409..411
                              src/modules/events/actions/listen-to-updates.test.js on lines 502..504
                              src/modules/events/actions/listen-to-updates.test.js on lines 505..507

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

                              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

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

                                shell.exec("webpack --config webpack.config.js", code => {
                                  if (code !== 0) {
                                    reject(new Error());
                                    shell.exit(code);
                                  }
                              Severity: Minor
                              Found in scripts/build.js and 1 other location - About 30 mins to fix
                              scripts/dev.js on lines 37..44

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

                              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

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

                                    if (addresses && addresses.length > 0) {
                                      if (!addresses.every(element => !element.address)) {
                                        return { success: true, addresses };
                                      }
                                    }
                              Severity: Minor
                              Found in src/modules/auth/components/trezor-connect/trezor-connect.jsx and 1 other location - About 30 mins to fix
                              src/modules/auth/components/ledger-connect/ledger-connect.jsx on lines 64..68

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

                              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