AugurProject/augur-ui

View on GitHub
src/modules/markets/reducers/outcomes-data.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function parseOutcomes has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function parseOutcomes(newMarketsData, outcomesData) {
  return Object.keys(newMarketsData).reduce((p, marketId) => {
    const marketData = newMarketsData[marketId];

    if (
Severity: Major
Found in src/modules/markets/reducers/outcomes-data.js - About 2 hrs to fix

    Function default has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function(outcomesData = DEFAULT_STATE, action) {
      switch (action.type) {
        case UPDATE_MARKETS_DATA:
          return {
            ...outcomesData,
    Severity: Minor
    Found in src/modules/markets/reducers/outcomes-data.js - About 1 hr 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

        There are no issues that match your filters.

        Category
        Status