AugurProject/augur-ui

View on GitHub

Showing 1,757 of 1,757 total issues

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

              <div>
                <label htmlFor="cm__input--min">
                  <span>Range Values</span>
                </label>
                <input
src/modules/create-market/components/create-market-form-outcome/create-market-form-outcome.jsx on lines 512..544

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

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

  render() {
    const { market, stakeInfo, outcomes } = this.props;
    const s = this.state;
    const winner = (outcomes && outcomes.find(o => o.tentativeWinning)) || {};
    const disputeRound = market.disputeInfo && market.disputeInfo.disputeRound;

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

    export const prevIcon = (
      <svg
        width="7px"
        height="11px"
        viewBox="0 0 7 11"
    Severity: Major
    Found in src/modules/common/components/icons.jsx and 1 other location - About 1 day to fix
    src/modules/common/components/icons.jsx on lines 1725..1761

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

    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

    export const nextIcon = (
      <svg
        width="7px"
        height="11px"
        viewBox="0 0 7 11"
    Severity: Major
    Found in src/modules/common/components/icons.jsx and 1 other location - About 1 day to fix
    src/modules/common/components/icons.jsx on lines 1687..1723

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

    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

        test("should handle the tradeDetails object if limitPrice is unchanged but share number changes", () => {
          store.dispatch(
            updateTradesInProgress({
              marketId: "testCategoricalMarketId",
              outcomeId: 0,
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 379..414
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 430..465
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 620..655

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

    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

        test("should handle the tradeDetails object if limitPrice is unchanged but share number changes to negative (should default to the positive version of the numShares: -25 becomes 25.)", () => {
          store.dispatch(
            updateTradesInProgress({
              marketId: "testCategoricalMarketId",
              outcomeId: 0,
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 379..414
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 430..465
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 583..618

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

    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

        test("should pass calculation tests for selling 10 shares of Outcome 1 at the default limitPrice", () => {
          store.dispatch(
            updateTradesInProgress({
              marketId: "testCategoricalMarketId",
              outcomeId: 1,
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 379..414
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 583..618
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 620..655

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

    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

        test("should pass calculation tests for buying 10 shares of Outcome 1 at the default limitPrice", () => {
          store.dispatch(
            updateTradesInProgress({
              marketId: "testCategoricalMarketId",
              outcomeId: 1,
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 430..465
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 583..618
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 620..655

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

    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

          switch (true) {
            case scalarBigNum === "":
              updatedMarket.validations[currentStep].scalarBigNum =
                "This field is required.";
              break;
    src/modules/create-market/components/create-market-form-outcome/create-market-form-outcome.jsx on lines 207..232

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

    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

        switch (true) {
          case scalarSmallNum === "":
            updatedMarket.validations[currentStep].scalarSmallNum =
              "This field is required.";
            break;
    src/modules/create-market/components/create-market-form-outcome/create-market-form-outcome.jsx on lines 236..261

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

    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

        test("should pass calculation tests for buying 10 shares of outcome 1 at the default limitPrice", () => {
          store.dispatch(
            updateTradesInProgress({
              marketId: "testScalarMarketId",
              outcomeId: 1,
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 76..111
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 127..162
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 269..304
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 306..341
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 744..779
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 885..920
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 922..957

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

    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

        test("should handle the tradeDetails object if limitPrice is unchanged but share number changes", () => {
          store.dispatch(
            updateTradesInProgress({
              marketId: "testYesNoMarketId",
              outcomeId: 0,
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 76..111
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 127..162
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 306..341
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 693..728
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 744..779
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 885..920
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 922..957

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

    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

        test("should pass calculation tests for selling 10 shares of YES at the default limitPrice", () => {
          store.dispatch(
            updateTradesInProgress({
              marketId: "testYesNoMarketId",
              outcomeId: 1,
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 76..111
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 269..304
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 306..341
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 693..728
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 744..779
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 885..920
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 922..957

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

    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

        test("should pass calculation tests for selling 10 shares of outcome1 at the default limitPrice", () => {
          store.dispatch(
            updateTradesInProgress({
              marketId: "testScalarMarketId",
              outcomeId: 1,
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 76..111
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 127..162
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 269..304
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 306..341
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 693..728
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 885..920
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 922..957

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

    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

        test("should handle the tradeDetails object if limitPrice is unchanged but share number changes to negative (should default to the positive version of the numShares: -25 becomes 25.)", () => {
          store.dispatch(
            updateTradesInProgress({
              marketId: "testScalarMarketId",
              outcomeId: 0,
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 76..111
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 127..162
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 269..304
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 306..341
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 693..728
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 744..779
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 885..920

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

    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

        test("should pass calculation tests for buying 10 shares of YES at the default limitPrice", () => {
          store.dispatch(
            updateTradesInProgress({
              marketId: "testYesNoMarketId",
              outcomeId: 0,
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 127..162
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 269..304
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 306..341
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 693..728
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 744..779
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 885..920
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 922..957

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

    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

        test("should handle the tradeDetails object if limitPrice is unchanged but share number changes to negative (should default to the positive version of the numShares: -25 becomes 25.)", () => {
          store.dispatch(
            updateTradesInProgress({
              marketId: "testYesNoMarketId",
              outcomeId: 0,
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 76..111
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 127..162
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 269..304
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 693..728
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 744..779
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 885..920
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 922..957

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

    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

        test("should handle the tradeDetails object if limitPrice is unchanged but share number changes", () => {
          store.dispatch(
            updateTradesInProgress({
              marketId: "testScalarMarketId",
              outcomeId: 0,
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 76..111
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 127..162
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 269..304
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 306..341
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 693..728
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 744..779
    src/modules/trades/actions/update-trades-in-progress.test.js on lines 922..957

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

    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

        this.props.myMarkets.forEach((market, index) => {
          if (market.reportingState === this.reportingStates.PRE_REPORTING) {
            openMarkets.push(market);
            filteredMarketsOpen.push(market.id);
          } else if (
    Severity: Major
    Found in src/modules/portfolio/components/markets/markets.jsx and 1 other location - About 1 day to fix
    src/modules/portfolio/components/markets/markets.jsx on lines 102..121

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

    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

        nextProps.myMarkets.forEach((market, index) => {
          if (market.reportingState === this.reportingStates.PRE_REPORTING) {
            openMarkets.push(market);
            filteredMarketsOpen.push(market.id);
          } else if (
    Severity: Major
    Found in src/modules/portfolio/components/markets/markets.jsx and 1 other location - About 1 day to fix
    src/modules/portfolio/components/markets/markets.jsx on lines 53..72

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

    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