AugurProject/augur-ui

View on GitHub
src/modules/events/actions/listen-to-updates.test.js

Summary

Maintainability
F
3 days
Test Coverage

File listen-to-updates.test.js has 505 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { listenToUpdates } from "modules/events/actions/listen-to-updates";
import * as augurjs from "services/augurjs";
import * as loadMarketsInfoModule from "modules/markets/actions/load-markets-info";
import * as loadUnclaimedFeesModule from "modules/markets/actions/market-creator-fees-management";
import * as convertLogsToTransactionsModule from "modules/transactions/actions/convert-logs-to-transactions";
Severity: Major
Found in src/modules/events/actions/listen-to-updates.test.js - About 1 day to fix

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

          augurOnSpy = jest
            .spyOn(augurjs.augur.events.nodes.augur, "on")
            .mockImplementationOnce((label, onDisconnect) => {
              expect(label).toStrictEqual("disconnect");
              expect(typeof onDisconnect).toStrictEqual("function");
    Severity: Major
    Found in src/modules/events/actions/listen-to-updates.test.js and 1 other location - About 2 hrs to fix
    src/modules/events/actions/listen-to-updates.test.js on lines 106..112

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

    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

          ethereumOnSpy = jest
            .spyOn(augurjs.augur.events.nodes.ethereum, "on")
            .mockImplementationOnce((label, onDisconnect) => {
              expect(label).toStrictEqual("disconnect");
              expect(typeof onDisconnect).toStrictEqual("function");
    Severity: Major
    Found in src/modules/events/actions/listen-to-updates.test.js and 1 other location - About 2 hrs to fix
    src/modules/events/actions/listen-to-updates.test.js on lines 99..105

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

    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

        afterEach(() => {
          store.clearActions();
          stopBlockListenersSpy.mockReset();
          stopAugurNodeEventListenersSpy.mockReset();
          startBlockListenersSpy.mockReset();
    Severity: Major
    Found in src/modules/events/actions/listen-to-updates.test.js and 1 other location - About 2 hrs to fix
    src/modules/events/actions/log-handlers.test.js on lines 82..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 82.

    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

          jest
            .spyOn(augurjs.augur.events, "startAugurNodeEventListeners")
            .mockImplementation(listeners =>
              listeners.InitialReporterRedeemed(null, {
                eventName: "InitialReporterRedeemed",
    Severity: Major
    Found in src/modules/events/actions/listen-to-updates.test.js and 4 other locations - About 1 hr to fix
    src/modules/events/actions/listen-to-updates.test.js on lines 287..296
    src/modules/events/actions/listen-to-updates.test.js on lines 306..315
    src/modules/events/actions/listen-to-updates.test.js on lines 449..458
    src/modules/events/actions/listen-to-updates.test.js on lines 516..525

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

    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

          jest
            .spyOn(augurjs.augur.events, "startAugurNodeEventListeners")
            .mockImplementation(listeners =>
              listeners.TokensTransferred(null, {
                eventName: "TokensTransferred",
    Severity: Major
    Found in src/modules/events/actions/listen-to-updates.test.js and 4 other locations - About 1 hr to fix
    src/modules/events/actions/listen-to-updates.test.js on lines 287..296
    src/modules/events/actions/listen-to-updates.test.js on lines 306..315
    src/modules/events/actions/listen-to-updates.test.js on lines 423..432
    src/modules/events/actions/listen-to-updates.test.js on lines 449..458

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

    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

          jest
            .spyOn(augurjs.augur.events, "startAugurNodeEventListeners")
            .mockImplementation(listeners =>
              listeners.InitialReporterRedeemed(null, {
                eventName: "InitialReporterRedeemed",
    Severity: Major
    Found in src/modules/events/actions/listen-to-updates.test.js and 4 other locations - About 1 hr to fix
    src/modules/events/actions/listen-to-updates.test.js on lines 287..296
    src/modules/events/actions/listen-to-updates.test.js on lines 306..315
    src/modules/events/actions/listen-to-updates.test.js on lines 423..432
    src/modules/events/actions/listen-to-updates.test.js on lines 516..525

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

    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

          jest
            .spyOn(augurjs.augur.events, "startAugurNodeEventListeners")
            .mockImplementationOnce(listeners =>
              listeners.InitialReportSubmitted(null, {
                eventName: "InitialReportSubmitted",
    Severity: Major
    Found in src/modules/events/actions/listen-to-updates.test.js and 4 other locations - About 1 hr to fix
    src/modules/events/actions/listen-to-updates.test.js on lines 306..315
    src/modules/events/actions/listen-to-updates.test.js on lines 423..432
    src/modules/events/actions/listen-to-updates.test.js on lines 449..458
    src/modules/events/actions/listen-to-updates.test.js on lines 516..525

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

    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

          jest
            .spyOn(augurjs.augur.events, "startAugurNodeEventListeners")
            .mockImplementation(listeners =>
              listeners.InitialReportSubmitted(null, {
                eventName: "InitialReportSubmitted",
    Severity: Major
    Found in src/modules/events/actions/listen-to-updates.test.js and 4 other locations - About 1 hr to fix
    src/modules/events/actions/listen-to-updates.test.js on lines 287..296
    src/modules/events/actions/listen-to-updates.test.js on lines 423..432
    src/modules/events/actions/listen-to-updates.test.js on lines 449..458
    src/modules/events/actions/listen-to-updates.test.js on lines 516..525

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

    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

        afterEach(() => {
          stopBlockListenersSpy.mockReset();
          stopAugurNodeEventListenersSpy.mockReset();
          startBlockListenersSpy.mockReset();
          augurOnSpy.mockReset();
    Severity: Major
    Found in src/modules/events/actions/listen-to-updates.test.js and 1 other location - About 1 hr to fix
    src/modules/app/actions/verify-matching-network-ids.test.js on lines 171..177

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

    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

          stopBlockListenersSpy = jest
            .spyOn(augurjs.augur.events, "stopBlockListeners")
            .mockImplementationOnce(() =>
              store.dispatch(ACTIONS.STOP_BLOCK_LISTENERS)
            );
    Severity: Minor
    Found in src/modules/events/actions/listen-to-updates.test.js and 1 other location - About 35 mins to fix
    src/modules/events/actions/listen-to-updates.test.js on lines 65..69

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

    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

          stopAugurNodeEventListenersSpy = jest
            .spyOn(augurjs.augur.events, "stopAugurNodeEventListeners")
            .mockImplementationOnce(() =>
              store.dispatch(ACTIONS.STOP_AUGUR_NODE_EVENT_LISTENERS)
            );
    Severity: Minor
    Found in src/modules/events/actions/listen-to-updates.test.js and 1 other location - About 35 mins to fix
    src/modules/events/actions/listen-to-updates.test.js on lines 60..64

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

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

    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 409..411
    src/modules/events/actions/listen-to-updates.test.js on lines 502..504

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

    There are no issues that match your filters.

    Category
    Status