initiatived21/d21

View on GitHub

Showing 167 of 611 total issues

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

        <OffCanvasMenuItem href={localPath('/howitworks')} active={currentPage === 'pages#howitworks'}
          handleClick={this.hide}>
          {this.t('.items.howitworks')}
        </OffCanvasMenuItem>
Severity: Major
Found in client/app/OffCanvasMenu/components/OffCanvasMenu.jsx and 4 other locations - About 1 hr to fix
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 33..36
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 37..40
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 41..44
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 49..52

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

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

        <OffCanvasMenuItem href={localPath('/pledges/new')} active={currentPage === 'pledges#new'}
          handleClick={this.hide}>
          {this.t('.items.new_pledge')}
        </OffCanvasMenuItem>
Severity: Major
Found in client/app/OffCanvasMenu/components/OffCanvasMenu.jsx and 4 other locations - About 1 hr to fix
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 33..36
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 41..44
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 45..48
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 49..52

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

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

        <OffCanvasMenuItem href={localPath('/about')} active={currentPage === 'pages#about'}
          handleClick={this.hide}>
          {this.t('.items.about')}
        </OffCanvasMenuItem>
Severity: Major
Found in client/app/OffCanvasMenu/components/OffCanvasMenu.jsx and 4 other locations - About 1 hr to fix
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 33..36
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 37..40
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 41..44
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 45..48

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

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

        <OffCanvasMenuItem href={localPath('/pledges')} active={currentPage === 'pledges#index'}
          handleClick={this.hide}>
          {this.t('.items.all_pledges')}
        </OffCanvasMenuItem>
Severity: Major
Found in client/app/OffCanvasMenu/components/OffCanvasMenu.jsx and 4 other locations - About 1 hr to fix
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 33..36
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 37..40
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 45..48
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 49..52

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

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

        <OffCanvasMenuItem href={localPath('/')} active={currentPage === 'pages#home'}
          handleClick={this.hide}>
          {this.t('.items.start')}
        </OffCanvasMenuItem>
Severity: Major
Found in client/app/OffCanvasMenu/components/OffCanvasMenu.jsx and 4 other locations - About 1 hr to fix
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 37..40
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 41..44
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 45..48
client/app/OffCanvasMenu/components/OffCanvasMenu.jsx on lines 49..52

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

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

  it('should create an action to sign a pledge', function() {
    const id = 4
    const expectedAction = {
      type: SIGN_PLEDGE,
      id
Severity: Major
Found in client/app/Sidebar/actions/sidebarActions_test.js and 2 other locations - About 1 hr to fix
client/app/CommentList/actions/commentListActions_test.js on lines 5..13
client/app/Sidebar/actions/sidebarActions_test.js on lines 15..23

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

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

    const {
      selected, name, onChange, placeholder, minDate, maxDate, locale,
      dateFormat, onBlur,
    } = this.props
Severity: Major
Found in client/app/Inputs/components/DateInputComponent.jsx and 1 other location - About 1 hr to fix
client/app/PledgeTile/components/PledgeTileBack.jsx on lines 24..27

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

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

  it('should create an action to submit an update', function() {
    const pledgeId = 4
    const expectedAction = {
      type: SUBMIT_UPDATE,
      pledgeId
Severity: Major
Found in client/app/Sidebar/actions/sidebarActions_test.js and 2 other locations - About 1 hr to fix
client/app/CommentList/actions/commentListActions_test.js on lines 5..13
client/app/Sidebar/actions/sidebarActions_test.js on lines 5..13

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

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

    case 'disapproved':
      stateElement = (
        <p className={`${className} c-pledge-state--disapproved`}>
          <FontAwesome className="c-pledge-state__thumbs-down" name="thumbs-o-down" />
        </p>
Severity: Major
Found in client/app/PledgeData/components/PledgeState.jsx and 2 other locations - About 1 hr to fix
client/app/PledgeData/components/PledgeState.jsx on lines 19..25
client/app/PledgeData/components/PledgeState.jsx on lines 26..32

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

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

  it('should create an action to ask a question', function() {
    const pledgeId = 3
    const expectedAction = {
      type: ASK_QUESTION,
      pledgeId
Severity: Major
Found in client/app/CommentList/actions/commentListActions_test.js and 2 other locations - About 1 hr to fix
client/app/Sidebar/actions/sidebarActions_test.js on lines 5..13
client/app/Sidebar/actions/sidebarActions_test.js on lines 15..23

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

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

    case 'failed':
      stateElement = (
        <p className={`${className} c-pledge-state--failed`}>
          <FontAwesome className="c-pledge-state__x" name="times" />
        </p>
Severity: Major
Found in client/app/PledgeData/components/PledgeState.jsx and 2 other locations - About 1 hr to fix
client/app/PledgeData/components/PledgeState.jsx on lines 19..25
client/app/PledgeData/components/PledgeState.jsx on lines 33..39

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

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

    const {
      initiatorName, initiatorImage, content, amount, who, requirement, path,
      className, locale
    } = this.props
Severity: Major
Found in client/app/PledgeTile/components/PledgeTileBack.jsx and 1 other location - About 1 hr to fix
client/app/Inputs/components/DateInputComponent.jsx on lines 21..24

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

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

    case 'successful':
      stateElement = (
        <p className={`${className} c-pledge-state--successful`}>
          <FontAwesome className="c-pledge-state__check" name="check" />
        </p>
Severity: Major
Found in client/app/PledgeData/components/PledgeState.jsx and 2 other locations - About 1 hr to fix
client/app/PledgeData/components/PledgeState.jsx on lines 26..32
client/app/PledgeData/components/PledgeState.jsx on lines 33..39

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

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

  sidebar 'Zustand', only: :show do
    attributes_table_for pledge do
      row :aasm_state do
        para "Aktuell: #{pledge.aasm_state}"

Severity: Major
Found in app/admin/pledge.rb and 1 other location - About 1 hr to fix
app/admin/comment.rb on lines 34..44

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 49.

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

  sidebar 'Zustand', only: :show do
    attributes_table_for question do
      row :aasm_state do
        para "Aktuell: #{question.aasm_state}"

Severity: Major
Found in app/admin/comment.rb and 1 other location - About 1 hr to fix
app/admin/pledge.rb on lines 67..77

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

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

  it('should display zero days if date is in the past', function() {
    const clock = sinon.useFakeTimers(fakeNow)

    daysTill('2016-08-01').should.equal(0)

Severity: Major
Found in client/app/lib/date_and_time/daysTill_test.js and 1 other location - About 1 hr to fix
client/app/lib/date_and_time/daysTill_test.js on lines 7..13

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

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

  it('should display the remaining days if date is in the future', function() {
    const clock = sinon.useFakeTimers(fakeNow)

    daysTill('2016-08-16').should.equal(10)

Severity: Major
Found in client/app/lib/date_and_time/daysTill_test.js and 1 other location - About 1 hr to fix
client/app/lib/date_and_time/daysTill_test.js on lines 15..21

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

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

          <MediaQuery maxWidth={BREAKPOINT_L - 1}>
            <ActivePledgeForm
              form={this.props.form}
              tags={this.props.tags}
              id={this.props.id}
Severity: Major
Found in client/app/NewPledge/components/NewPledge.jsx and 1 other location - About 1 hr to fix
client/app/NewPledge/components/NewPledge.jsx on lines 52..58

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

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

        <svg className="c-tooltip__triangle" width="36" height="18" viewBox="0 0 36 17"
            xmlns="http://www.w3.org/2000/svg" aria-hidden="true" >
            <polygon points="0,0 36,0 18,17" />
        </svg>
Severity: Major
Found in client/app/Tooltip/components/Tooltip.jsx and 1 other location - About 1 hr to fix
client/app/UserSession/components/Session.jsx on lines 63..65

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

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

              <div className="o-layout__item u-2/3">
                <ActivePledgeForm
                  form={this.props.form}
                  tags={this.props.tags}
                  id={this.props.id}
Severity: Major
Found in client/app/NewPledge/components/NewPledge.jsx and 1 other location - About 1 hr to fix
client/app/NewPledge/components/NewPledge.jsx on lines 41..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 55.

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