UTD-CRSS/app.exploreapollo.org

View on GitHub

Showing 206 of 270 total issues

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

function generateLegend(data) {
  var result = [];
  data.map((datum, index) => result.push(<span key={index} style={{color:D3.schemeCategory10[index]}}>&emsp;{datum.name}&emsp;</span>));
  return result;
}
Severity: Major
Found in src/components/DashboardDiagram/index.js and 2 other locations - About 3 hrs to fix
src/components/BarDiagram/index.js on lines 88..92
src/components/LineDiagram/index.js on lines 129..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 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 3 locations. Consider refactoring.
Open

function generateLegend(data) {
  var result = [];
  data.map((datum, index) =>
    result.push(
      <span key={index} style={{ color: D3.schemeCategory10[index] }}>
Severity: Major
Found in src/components/LineDiagram/index.js and 2 other locations - About 3 hrs to fix
src/components/BarDiagram/index.js on lines 88..92
src/components/DashboardDiagram/index.js on lines 97..101

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

    targetcards = _.filter(cards, function (card) {
      return (
        card == null ||
        (card.met_start != null &&
          ((card.met_start >= mstart && card.met_start <= mend) ||
Severity: Major
Found in src/components/Apollo11StoryTimeline/index.js and 1 other location - About 2 hrs to fix
src/containers/Apollo11Explorer/index.js on lines 70..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 88.

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

    targetstories = _.filter(stories, function (story) {
      return (
        day == null ||
        (story.met_start != null &&
          ((story.met_start >= mstart && story.met_start <= mend) ||
Severity: Major
Found in src/containers/Apollo11Explorer/index.js and 1 other location - About 2 hrs to fix
src/components/Apollo11StoryTimeline/index.js on lines 143..150

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

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

          <div className="col-lg-1 day-btn-col">
            <Link className="btn day-btn" to={url.concat("day/3")}>
              <div className="day-btn-label">Day 3</div>
              <div className="day-btn-text">Jul 18th</div>
            </Link>
Severity: Major
Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
src/components/DayDisplay/index.js on lines 94..99
src/components/DayDisplay/index.js on lines 100..105
src/components/DayDisplay/index.js on lines 112..117
src/components/DayDisplay/index.js on lines 118..123
src/components/DayDisplay/index.js on lines 124..129
src/components/DayDisplay/index.js on lines 130..135
src/components/DayDisplay/index.js on lines 136..141
src/components/DayDisplay/index.js on lines 142..147

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

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

          <div className="col-lg-1 day-btn-col">
            <Link className="btn day-btn" to={url.concat("day/1")}>
              <div className="day-btn-label">Day 1</div>
              <div className="day-btn-text">Jul 16th</div>
            </Link>
Severity: Major
Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
src/components/DayDisplay/index.js on lines 100..105
src/components/DayDisplay/index.js on lines 106..111
src/components/DayDisplay/index.js on lines 112..117
src/components/DayDisplay/index.js on lines 118..123
src/components/DayDisplay/index.js on lines 124..129
src/components/DayDisplay/index.js on lines 130..135
src/components/DayDisplay/index.js on lines 136..141
src/components/DayDisplay/index.js on lines 142..147

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

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

          <div className="col-lg-1 day-btn-col">
            <Link className="btn day-btn" to={url.concat("day/7")}>
              <div className="day-btn-label">Day 7</div>
              <div className="day-btn-text">Jul 22nd</div>
            </Link>
Severity: Major
Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
src/components/DayDisplay/index.js on lines 94..99
src/components/DayDisplay/index.js on lines 100..105
src/components/DayDisplay/index.js on lines 106..111
src/components/DayDisplay/index.js on lines 112..117
src/components/DayDisplay/index.js on lines 118..123
src/components/DayDisplay/index.js on lines 124..129
src/components/DayDisplay/index.js on lines 136..141
src/components/DayDisplay/index.js on lines 142..147

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

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

          <div className="col-lg-1 day-btn-col">
            <Link className="btn day-btn" to={url.concat("day/5")}>
              <div className="day-btn-label">Day 5</div>
              <div className="day-btn-text">Jul 20th</div>
            </Link>
Severity: Major
Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
src/components/DayDisplay/index.js on lines 94..99
src/components/DayDisplay/index.js on lines 100..105
src/components/DayDisplay/index.js on lines 106..111
src/components/DayDisplay/index.js on lines 112..117
src/components/DayDisplay/index.js on lines 124..129
src/components/DayDisplay/index.js on lines 130..135
src/components/DayDisplay/index.js on lines 136..141
src/components/DayDisplay/index.js on lines 142..147

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

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

          <div className="col-lg-1 day-btn-col">
            <Link className="btn day-btn" to={url.concat("day/4")}>
              <div className="day-btn-label">Day 4</div>
              <div className="day-btn-text">Jul 19th</div>
            </Link>
Severity: Major
Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
src/components/DayDisplay/index.js on lines 94..99
src/components/DayDisplay/index.js on lines 100..105
src/components/DayDisplay/index.js on lines 106..111
src/components/DayDisplay/index.js on lines 118..123
src/components/DayDisplay/index.js on lines 124..129
src/components/DayDisplay/index.js on lines 130..135
src/components/DayDisplay/index.js on lines 136..141
src/components/DayDisplay/index.js on lines 142..147

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

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

          <div className="col-lg-1 day-btn-col">
            <Link className="btn day-btn" to={url.concat("day/9")}>
              <div className="day-btn-label">Day 9</div>
              <div className="day-btn-text">Jul 24th</div>
            </Link>
Severity: Major
Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
src/components/DayDisplay/index.js on lines 94..99
src/components/DayDisplay/index.js on lines 100..105
src/components/DayDisplay/index.js on lines 106..111
src/components/DayDisplay/index.js on lines 112..117
src/components/DayDisplay/index.js on lines 118..123
src/components/DayDisplay/index.js on lines 124..129
src/components/DayDisplay/index.js on lines 130..135
src/components/DayDisplay/index.js on lines 136..141

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

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

          <div className="col-lg-1 day-btn-col">
            <Link className="btn day-btn" to={url.concat("day/8")}>
              <div className="day-btn-label">Day 8</div>
              <div className="day-btn-text">Jul 23rd</div>
            </Link>
Severity: Major
Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
src/components/DayDisplay/index.js on lines 94..99
src/components/DayDisplay/index.js on lines 100..105
src/components/DayDisplay/index.js on lines 106..111
src/components/DayDisplay/index.js on lines 112..117
src/components/DayDisplay/index.js on lines 118..123
src/components/DayDisplay/index.js on lines 124..129
src/components/DayDisplay/index.js on lines 130..135
src/components/DayDisplay/index.js on lines 142..147

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

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

          <div className="col-lg-1 day-btn-col">
            <Link className="btn day-btn" to={url.concat("day/2")}>
              <div className="day-btn-label">Day 2</div>
              <div className="day-btn-text">Jul 17th</div>
            </Link>
Severity: Major
Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
src/components/DayDisplay/index.js on lines 94..99
src/components/DayDisplay/index.js on lines 106..111
src/components/DayDisplay/index.js on lines 112..117
src/components/DayDisplay/index.js on lines 118..123
src/components/DayDisplay/index.js on lines 124..129
src/components/DayDisplay/index.js on lines 130..135
src/components/DayDisplay/index.js on lines 136..141
src/components/DayDisplay/index.js on lines 142..147

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

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

          <div className="col-lg-1 day-btn-col">
            <Link className="btn day-btn" to={url.concat("day/6")}>
              <div className="day-btn-label">Day 6</div>
              <div className="day-btn-text">Jul 21st</div>
            </Link>
Severity: Major
Found in src/components/DayDisplay/index.js and 8 other locations - About 2 hrs to fix
src/components/DayDisplay/index.js on lines 94..99
src/components/DayDisplay/index.js on lines 100..105
src/components/DayDisplay/index.js on lines 106..111
src/components/DayDisplay/index.js on lines 112..117
src/components/DayDisplay/index.js on lines 118..123
src/components/DayDisplay/index.js on lines 130..135
src/components/DayDisplay/index.js on lines 136..141
src/components/DayDisplay/index.js on lines 142..147

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

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

    return (
      <div className="app-container">
        <AppHeader />
        <div className="moments-container">
          <h1 className="titleBanner-smaller">Moments</h1>
Severity: Major
Found in src/containers/Moments/index.js and 1 other location - About 2 hrs to fix
src/containers/Stories/index.js on lines 34..43

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

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

    return (
      <div className="app-container">
        <AppHeader />
        <div className="container">
          <h1 className="titleBanner-smaller">Stories</h1>
Severity: Major
Found in src/containers/Stories/index.js and 1 other location - About 2 hrs to fix
src/containers/Moments/index.js on lines 21..30

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

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

    const rawAll = data.series
      .map((datum) => {
        return { name: datum.name, value: form(datum.value) };
      })
      .filter((datum) => datum.value.length > 0);
Severity: Major
Found in src/components/LineDiagram/index.js and 2 other locations - About 2 hrs to fix
src/components/BarDiagram/index.js on lines 19..19
src/components/DashboardDiagram/index.js on lines 19..19

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

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

    const rawAll = data.series.map((datum => {return {name: datum.name, value: form(datum.value)};})).filter(datum => datum.value.length > 0);
Severity: Major
Found in src/components/BarDiagram/index.js and 2 other locations - About 2 hrs to fix
src/components/DashboardDiagram/index.js on lines 19..19
src/components/LineDiagram/index.js on lines 23..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 77.

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

    const rawAll = data.series.map((datum => {return {name: datum.name, value: form(datum.value)};})).filter(datum => datum.value.length > 0);
Severity: Major
Found in src/components/DashboardDiagram/index.js and 2 other locations - About 2 hrs to fix
src/components/BarDiagram/index.js on lines 19..19
src/components/LineDiagram/index.js on lines 23..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 77.

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 a title", function() {
    const item = shallow(
      <MomentNoteItem id={1} title="gary oak" text="text" />
    );
    expect(item.find("h1").text()).toBe("gary oak");
Severity: Major
Found in src/components/MomentNote/index.test.js and 1 other location - About 2 hrs to fix
src/components/MomentNote/index.test.js on lines 43..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 77.

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

  render() {
    return (
      <div className="app-container">
        <AppHeader />
        <div className="text-center lead">
Severity: Major
Found in src/containers/RandomMoment/index.js and 1 other location - About 2 hrs to fix
src/containers/Stories/index.js on lines 21..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 77.

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