AugurProject/augur-ui

View on GitHub

Showing 1,757 of 1,757 total issues

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

            <li>
              <button
                className={classNames({
                  [`${StylesForm.active}`]: newMarket.type === YES_NO
                })}
src/modules/create-market/components/create-market-form-outcome/create-market-form-outcome.jsx on lines 393..403
src/modules/create-market/components/create-market-form-outcome/create-market-form-outcome.jsx on lines 404..414
src/modules/create-market/components/create-market-form-resolution/create-market-form-resolution.jsx on lines 112..123
src/modules/create-market/components/create-market-form-resolution/create-market-form-resolution.jsx on lines 174..188

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

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

            <li>
              <button
                className={classNames({
                  [`${StylesForm.active}`]: newMarket.type === CATEGORICAL
                })}
src/modules/create-market/components/create-market-form-outcome/create-market-form-outcome.jsx on lines 382..392
src/modules/create-market/components/create-market-form-outcome/create-market-form-outcome.jsx on lines 404..414
src/modules/create-market/components/create-market-form-resolution/create-market-form-resolution.jsx on lines 112..123
src/modules/create-market/components/create-market-form-resolution/create-market-form-resolution.jsx on lines 174..188

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

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

            <li>
              <button
                className={classNames({
                  [`${StylesForm.active}`]:
                    newMarket.designatedReporterType ===
src/modules/create-market/components/create-market-form-outcome/create-market-form-outcome.jsx on lines 382..392
src/modules/create-market/components/create-market-form-outcome/create-market-form-outcome.jsx on lines 393..403
src/modules/create-market/components/create-market-form-outcome/create-market-form-outcome.jsx on lines 404..414
src/modules/create-market/components/create-market-form-resolution/create-market-form-resolution.jsx on lines 112..123

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

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

            <li>
              <button
                className={classNames({
                  [`${StylesForm.active}`]: newMarket.type === SCALAR
                })}
src/modules/create-market/components/create-market-form-outcome/create-market-form-outcome.jsx on lines 382..392
src/modules/create-market/components/create-market-form-outcome/create-market-form-outcome.jsx on lines 393..403
src/modules/create-market/components/create-market-form-resolution/create-market-form-resolution.jsx on lines 112..123
src/modules/create-market/components/create-market-form-resolution/create-market-form-resolution.jsx on lines 174..188

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

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

                <ul className={Styles.MarketLiquidity__TableHeader}>
                  <li>Type</li>
                  <li>Outcome</li>
                  <li>Quantity</li>
                  <li>Limit Price</li>
src/modules/create-market/components/create-market-form-liquidity-orders/create-market-form-liquidity-orders.jsx on lines 34..41

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

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

            <ul className={Styles.LiquidityOrders__TableHeader}>
              <li>Type</li>
              <li>Outcome</li>
              <li>Quantity</li>
              <li>Limit Price</li>
src/modules/market/components/market-liquidity/market-liquidity.jsx on lines 179..186

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

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

  render() {
    const { closeModal, markets } = this.props;

    const { didCheck } = this.state;
    const marketsRows = markets.map(market => (
Severity: Major
Found in src/modules/modal/components/modal-v2-markets-alert.jsx - About 3 hrs to fix

    Function render has 76 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      render() {
        const { isConnectedThroughWeb3, modal } = this.props;
        const { formErrors, connectErrors, augurNode, ethereumNode } = this.state;
        const AugurNodeInValid = formErrors.augurNode.length > 0;
        const ethereumNodeInValid = formErrors.ethereumNode.length > 0;
    Severity: Major
    Found in src/modules/modal/components/modal-network-connect.jsx - About 3 hrs to fix

      Function orderValidation has 75 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        orderValidation(order, nextProps = null) {
          let errors = {
            [this.INPUT_TYPES.QUANTITY]: [],
            [this.INPUT_TYPES.PRICE]: [],
            [this.INPUT_TYPES.MARKET_ORDER_SIZE]: [],
      Severity: Major
      Found in src/modules/trading/components/trading--form/trading--form.jsx - About 3 hrs to fix

        Function render has 75 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          render() {
            const { hasLoadedMarkets } = this.props;
            const { width, placeholder, search } = this.state;
        
            return (
        Severity: Major
        Found in src/modules/filter-sort/components/filter-search/filter-search.jsx - About 3 hrs to fix

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

                describe("when false", () => {
                  beforeEach(() => {
                    doesUserHaveRep = false;
                  });
          
          
          src/modules/reporting/components/reporting-dispute/reporting-dispute.test.jsx on lines 23..34

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

          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

                describe("when true", () => {
                  beforeEach(() => {
                    doesUserHaveRep = true;
                  });
          
          
          src/modules/reporting/components/reporting-dispute/reporting-dispute.test.jsx on lines 36..47

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

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

            it("report on outcome_2", async () => {
              await expect(page).toClick("button", {
                text: "outcome_2",
                timeout: 1000
              });
          Severity: Major
          Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
          integration/reporting/reporting.test.ts on lines 44..58
          integration/reporting/reporting.test.ts on lines 76..90
          integration/reporting/reporting.test.ts on lines 92..106
          integration/reporting/reporting.test.ts on lines 108..122
          integration/reporting/reporting.test.ts on lines 155..169
          integration/reporting/reporting.test.ts on lines 171..185
          integration/reporting/reporting.test.ts on lines 187..201
          integration/reporting/reporting.test.ts on lines 203..217
          integration/reporting/reporting.test.ts on lines 219..233

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

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

            it("report on outcome_1", async () => {
              await expect(page).toClick("button", {
                text: "outcome_1",
                timeout: 10000
              });
          Severity: Major
          Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
          integration/reporting/reporting.test.ts on lines 44..58
          integration/reporting/reporting.test.ts on lines 60..74
          integration/reporting/reporting.test.ts on lines 76..90
          integration/reporting/reporting.test.ts on lines 92..106
          integration/reporting/reporting.test.ts on lines 108..122
          integration/reporting/reporting.test.ts on lines 171..185
          integration/reporting/reporting.test.ts on lines 187..201
          integration/reporting/reporting.test.ts on lines 203..217
          integration/reporting/reporting.test.ts on lines 219..233

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

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

            it("report on outcome_3", async () => {
              await expect(page).toClick("button", {
                text: "outcome_3",
                timeout: 1000
              });
          Severity: Major
          Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
          integration/reporting/reporting.test.ts on lines 44..58
          integration/reporting/reporting.test.ts on lines 60..74
          integration/reporting/reporting.test.ts on lines 92..106
          integration/reporting/reporting.test.ts on lines 108..122
          integration/reporting/reporting.test.ts on lines 155..169
          integration/reporting/reporting.test.ts on lines 171..185
          integration/reporting/reporting.test.ts on lines 187..201
          integration/reporting/reporting.test.ts on lines 203..217
          integration/reporting/reporting.test.ts on lines 219..233

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

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

            it("report on outcome_1", async () => {
              await expect(page).toClick("button", {
                text: "outcome_1",
                timeout: 1000
              });
          Severity: Major
          Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
          integration/reporting/reporting.test.ts on lines 60..74
          integration/reporting/reporting.test.ts on lines 76..90
          integration/reporting/reporting.test.ts on lines 92..106
          integration/reporting/reporting.test.ts on lines 108..122
          integration/reporting/reporting.test.ts on lines 155..169
          integration/reporting/reporting.test.ts on lines 171..185
          integration/reporting/reporting.test.ts on lines 187..201
          integration/reporting/reporting.test.ts on lines 203..217
          integration/reporting/reporting.test.ts on lines 219..233

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

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

            it("report on outcome_4", async () => {
              await expect(page).toClick("button", {
                text: "outcome_4",
                timeout: 1000
              });
          Severity: Major
          Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
          integration/reporting/reporting.test.ts on lines 44..58
          integration/reporting/reporting.test.ts on lines 60..74
          integration/reporting/reporting.test.ts on lines 76..90
          integration/reporting/reporting.test.ts on lines 92..106
          integration/reporting/reporting.test.ts on lines 108..122
          integration/reporting/reporting.test.ts on lines 155..169
          integration/reporting/reporting.test.ts on lines 171..185
          integration/reporting/reporting.test.ts on lines 187..201
          integration/reporting/reporting.test.ts on lines 219..233

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

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

            it("report on Invalid", async () => {
              await expect(page).toClick("button", {
                text: "Market is invalid",
                timeout: 1000
              });
          Severity: Major
          Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
          integration/reporting/reporting.test.ts on lines 44..58
          integration/reporting/reporting.test.ts on lines 60..74
          integration/reporting/reporting.test.ts on lines 76..90
          integration/reporting/reporting.test.ts on lines 92..106
          integration/reporting/reporting.test.ts on lines 108..122
          integration/reporting/reporting.test.ts on lines 155..169
          integration/reporting/reporting.test.ts on lines 171..185
          integration/reporting/reporting.test.ts on lines 187..201
          integration/reporting/reporting.test.ts on lines 203..217

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

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

            it("report on Invalid", async () => {
              await expect(page).toClick("button", {
                text: "Market is invalid",
                timeout: 1000
              });
          Severity: Major
          Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
          integration/reporting/reporting.test.ts on lines 44..58
          integration/reporting/reporting.test.ts on lines 60..74
          integration/reporting/reporting.test.ts on lines 76..90
          integration/reporting/reporting.test.ts on lines 92..106
          integration/reporting/reporting.test.ts on lines 155..169
          integration/reporting/reporting.test.ts on lines 171..185
          integration/reporting/reporting.test.ts on lines 187..201
          integration/reporting/reporting.test.ts on lines 203..217
          integration/reporting/reporting.test.ts on lines 219..233

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

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

            it("report on outcome_2", async () => {
              await expect(page).toClick("button", {
                text: "outcome_2",
                timeout: 1000
              });
          Severity: Major
          Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
          integration/reporting/reporting.test.ts on lines 44..58
          integration/reporting/reporting.test.ts on lines 60..74
          integration/reporting/reporting.test.ts on lines 76..90
          integration/reporting/reporting.test.ts on lines 92..106
          integration/reporting/reporting.test.ts on lines 108..122
          integration/reporting/reporting.test.ts on lines 155..169
          integration/reporting/reporting.test.ts on lines 187..201
          integration/reporting/reporting.test.ts on lines 203..217
          integration/reporting/reporting.test.ts on lines 219..233

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

          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