UTD-CRSS/app.exploreapollo.org

View on GitHub

Showing 270 of 270 total issues

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

        <h4>
          <b>
            4. Kera News<br></br>Published: December 20, 2017
          </b>
          <br></br>
Severity: Major
Found in src/components/InTheNewsComponent/index.js and 13 other locations - About 40 mins to fix
src/components/InTheNewsComponent/index.js on lines 10..15
src/components/InTheNewsComponent/index.js on lines 32..37
src/components/InTheNewsComponent/index.js on lines 54..59
src/components/InTheNewsComponent/index.js on lines 99..104
src/components/InTheNewsComponent/index.js on lines 121..126
src/components/InTheNewsComponent/index.js on lines 143..148
src/components/InTheNewsComponent/index.js on lines 166..171
src/components/InTheNewsComponent/index.js on lines 184..189
src/components/InTheNewsComponent/index.js on lines 200..205
src/components/InTheNewsComponent/index.js on lines 219..224
src/components/InTheNewsComponent/index.js on lines 242..247
src/components/InTheNewsComponent/index.js on lines 354..359
src/components/InTheNewsComponent/index.js on lines 377..382

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

Identical blocks of code found in 3 locations. Consider refactoring.
Open

      const slot = closestIndex(
        this.props.data.time,
        rawInteractions.map(function (index) {
          return Number(index.name);
        })
Severity: Major
Found in src/components/ChordDiagram/index.js and 2 other locations - About 40 mins to fix
src/components/ChordDiagram/index.js on lines 14..19
src/components/ChordDiagram/index.js on lines 31..36

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

        <h4>
          <b>
            12. Vanity Fair<br></br>Published: December 9, 2018
          </b>
          <br></br>
Severity: Major
Found in src/components/InTheNewsComponent/index.js and 13 other locations - About 40 mins to fix
src/components/InTheNewsComponent/index.js on lines 10..15
src/components/InTheNewsComponent/index.js on lines 32..37
src/components/InTheNewsComponent/index.js on lines 54..59
src/components/InTheNewsComponent/index.js on lines 76..81
src/components/InTheNewsComponent/index.js on lines 99..104
src/components/InTheNewsComponent/index.js on lines 121..126
src/components/InTheNewsComponent/index.js on lines 143..148
src/components/InTheNewsComponent/index.js on lines 166..171
src/components/InTheNewsComponent/index.js on lines 184..189
src/components/InTheNewsComponent/index.js on lines 200..205
src/components/InTheNewsComponent/index.js on lines 219..224
src/components/InTheNewsComponent/index.js on lines 354..359
src/components/InTheNewsComponent/index.js on lines 377..382

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

Identical blocks of code found in 3 locations. Consider refactoring.
Open

      const slot = closestIndex(
        this.props.data.time,
        rawInteractions.map(function (index) {
          return Number(index.name);
        })
Severity: Major
Found in src/components/ChordDiagram/index.js and 2 other locations - About 40 mins to fix
src/components/ChordDiagram/index.js on lines 14..19
src/components/ChordDiagram/index.js on lines 51..56

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

        <h4>
          <b>
            8. Texas Country Reporter<br></br>Published: May 31, 2019
          </b>
          <br></br>
Severity: Major
Found in src/components/InTheNewsComponent/index.js and 13 other locations - About 40 mins to fix
src/components/InTheNewsComponent/index.js on lines 10..15
src/components/InTheNewsComponent/index.js on lines 32..37
src/components/InTheNewsComponent/index.js on lines 54..59
src/components/InTheNewsComponent/index.js on lines 76..81
src/components/InTheNewsComponent/index.js on lines 99..104
src/components/InTheNewsComponent/index.js on lines 121..126
src/components/InTheNewsComponent/index.js on lines 143..148
src/components/InTheNewsComponent/index.js on lines 184..189
src/components/InTheNewsComponent/index.js on lines 200..205
src/components/InTheNewsComponent/index.js on lines 219..224
src/components/InTheNewsComponent/index.js on lines 242..247
src/components/InTheNewsComponent/index.js on lines 354..359
src/components/InTheNewsComponent/index.js on lines 377..382

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

        <h4>
          <b>
            14. FOX News<br></br>Published: July 19, 2019
          </b>
          <br></br>
Severity: Major
Found in src/components/InTheNewsComponent/index.js and 13 other locations - About 40 mins to fix
src/components/InTheNewsComponent/index.js on lines 10..15
src/components/InTheNewsComponent/index.js on lines 32..37
src/components/InTheNewsComponent/index.js on lines 54..59
src/components/InTheNewsComponent/index.js on lines 76..81
src/components/InTheNewsComponent/index.js on lines 99..104
src/components/InTheNewsComponent/index.js on lines 121..126
src/components/InTheNewsComponent/index.js on lines 143..148
src/components/InTheNewsComponent/index.js on lines 166..171
src/components/InTheNewsComponent/index.js on lines 184..189
src/components/InTheNewsComponent/index.js on lines 200..205
src/components/InTheNewsComponent/index.js on lines 219..224
src/components/InTheNewsComponent/index.js on lines 242..247
src/components/InTheNewsComponent/index.js on lines 377..382

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

    var list = mount(<StoryList stories={[
      {id: 1, title: "m1"},
      {id: 2, title: "m2"}
    ]} />);
Severity: Minor
Found in src/components/StoryList/index.test.js and 1 other location - About 40 mins to fix
src/components/MomentList/index.test.js on lines 14..17

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

    const list = mount(<MomentList moments={[
      {id: 1, title: "m1"},
      {id: 2, title: "m2"}
    ]} />);
Severity: Minor
Found in src/components/MomentList/index.test.js and 1 other location - About 40 mins to fix
src/components/StoryList/index.test.js on lines 15..18

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

    <Popover id="block-info-popup" {...props}>
      <Popover.Content style={{ fontSize: "1.2em" }}>
        A tape is usually more than 10 hours long so it is divided into smaller
        audio files called <strong>Blocks. </strong>A block is typically 30
        minutes long. Block 1 of a tape contains the first 30-minute audio,
Severity: Minor
Found in src/containers/Channels/index.js and 1 other location - About 40 mins to fix
src/containers/Channels/index.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 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

  <Popover {...props} id="nugget-info-popup">
    <Popover.Content style={{ fontSize: "1.2em" }}>
      30-minute blocks of audios are divided futher into even smaller pieces
      called <strong>Nuggets. </strong>A nugget is usually 5 minutes long.
      Nugget 1 contains the first 5-minute audio of a block, nugget 2 contains
Severity: Minor
Found in src/containers/Channels/index.js and 1 other location - About 40 mins to fix
src/containers/Channels/index.js on lines 28..36

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

    fetch(`${config.apiEntry}/api/stories`)
      .then((response) => {
        return response.json();
      })
      .then((stories) => {
Severity: Minor
Found in src/actions/index.js and 1 other location - About 40 mins to fix
src/actions/index.js on lines 239..251

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

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

    fetch(`${config.apiEntry}/api/moments/${momentId}/transcripts`)
      .then((response) => {
        return response.json();
      })
      .then((transcripts) => {
Severity: Minor
Found in src/actions/index.js and 1 other location - About 40 mins to fix
src/actions/index.js on lines 204..216

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

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

        {prevUrl && (
          <button className="btn btn-lg" id="playlistbutton-prev">
            <a href={prevUrl}>Previous</a>
          </button>
        )}
Severity: Minor
Found in src/components/PlaylistNavBar/index.js and 1 other location - About 40 mins to fix
src/components/PlaylistNavBar/index.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 48.

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

        {nextUrl && (
          <button className="btn btn-lg" id="playlistbutton-next">
            <a href={nextUrl}>Next</a>
          </button>
        )}
Severity: Minor
Found in src/components/PlaylistNavBar/index.js and 1 other location - About 40 mins to fix
src/components/PlaylistNavBar/index.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 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        timeline =
          parent.children[0].children[0].children[0].children[0].children[1];
Severity: Minor
Found in src/components/ChannelPlayer/index.js and 1 other location - About 35 mins to fix
src/containers/MomentViewer/index.js on lines 138..139

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

    fetch(`${config.apiEntry}/api/moments/random`)
      .then((response) => {
        return response.json();
      })
      .then((moment) => {
Severity: Minor
Found in src/actions/index.js and 1 other location - About 35 mins to fix
src/actions/index.js on lines 204..216

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

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

      timeline =
        parent.children[0].children[0].children[0].children[0].children[1];
Severity: Minor
Found in src/containers/MomentViewer/index.js and 1 other location - About 35 mins to fix
src/components/ChannelPlayer/index.js on lines 104..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 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

Function render has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  render() {
    const renderSearchResults = () => {
      const { loading, searching, moments } = this.state;

      if (loading && searching) {
Severity: Minor
Found in src/containers/Search/index.js - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function handleMove has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  handleMove(e) {
    const {top, gameOver} = this.state;
    if (gameOver) {
      return;
    }
Severity: Minor
Found in src/containers/Game/index.js - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function timelineClickEvent has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  timelineClickEvent(startTime) {
    //tolerance is to prevent number comparisons from being incorrect due to the very last decimal
    //because if the startTime and this.state.audio.time are not "equal" then the code will
    //create an infinite loop which will crash the momentViewer. We only experienced this issue on
    //moment 5 for some reason, and adding a tolerance was the simplest way to fix it after
Severity: Minor
Found in src/components/ChannelPlayer/index.js - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Severity
Category
Status
Source
Language