UTD-CRSS/app.exploreapollo.org

View on GitHub

Showing 270 of 270 total issues

Function componentDidUpdate has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

  componentDidUpdate() {
    let parent = ReactDOM.findDOMNode(this).children[2].children[1].children[0];
    console.log(parent);
    let timeline;
    let scrollHeight = 0;
Severity: Minor
Found in src/containers/MomentViewer/index.js - About 1 hr 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 BlockSelectMenu has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const BlockSelectMenu = (props) => {
  const { handleValueChange, blockIndex, minBlock, maxBlock } = props;

  var blockIndexArr = [];
  for (var i = minBlock; i <= maxBlock; i++) {
Severity: Minor
Found in src/containers/Channels/index.js - About 1 hr to fix

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

        const dashboardDiagramWidget = metrics.loading ? (
          <LoadingIndicator {...dashboardDiagramProps} />
        ) : (
          <DashboardDiagram
            data={{
    Severity: Major
    Found in src/containers/MomentViewer/index.js and 1 other location - About 1 hr to fix
    src/containers/MomentViewer/index.js on lines 242..254

    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

        const barDiagramWidget = metrics.loading ? (
          <LoadingIndicator {...barDiagramProps} />
        ) : (
          <BarDiagram
            data={{
    Severity: Major
    Found in src/containers/MomentViewer/index.js and 1 other location - About 1 hr to fix
    src/containers/MomentViewer/index.js on lines 260..272

    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

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

      render() {
        return (
          <div className="app-container">
            <AppHeader />
            <h1 className="center">
    Severity: Minor
    Found in src/containers/InTheNews/index.js - About 1 hr to fix

      Function componentDidUpdate has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        componentDidUpdate() {
          let parent = ReactDOM.findDOMNode(this).children[2].children[1].children[0];
          console.log(parent);
          let timeline;
          let scrollHeight = 0;
      Severity: Minor
      Found in src/containers/MomentViewer/index.js - About 1 hr to fix

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

            if (this.state.loading) {
              return (
                <div className="text-center lead">
                  <p>Loading DJ Apollo...</p>
                  <Spinner />
        Severity: Major
        Found in src/containers/DJ/index.js and 2 other locations - About 1 hr to fix
        src/containers/Apollo11Explorer/index.js on lines 94..101
        src/containers/StoryViewer/index.js on lines 23..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 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 8 locations. Consider refactoring.
        Open

              <button className="btn-secondary btn-lg flex-grow-1 addpadding bolder">
                <a href="">
                  {" "}
                  <font>Activities: Coming Soon</font>{" "}
                </a>
        Severity: Major
        Found in src/components/LessonList/index.js and 7 other locations - About 1 hr to fix
        src/components/LessonList/index.js on lines 52..57
        src/components/LessonList/index.js on lines 58..63
        src/components/LessonList/index.js on lines 81..86
        src/components/LessonList/index.js on lines 87..92
        src/components/LessonList/index.js on lines 109..114
        src/components/LessonList/index.js on lines 115..120
        src/components/LessonList/index.js on lines 127..132

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

              <button className="btn-primary btn-lg flex-grow-1 addpadding bolder">
                <a href="">
                  {" "}
                  <font>Tech: Coming Soon</font>{" "}
                </a>
        Severity: Major
        Found in src/components/LessonList/index.js and 7 other locations - About 1 hr to fix
        src/components/LessonList/index.js on lines 52..57
        src/components/LessonList/index.js on lines 58..63
        src/components/LessonList/index.js on lines 87..92
        src/components/LessonList/index.js on lines 109..114
        src/components/LessonList/index.js on lines 115..120
        src/components/LessonList/index.js on lines 127..132
        src/components/LessonList/index.js on lines 143..148

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

              <button className="btn-primary btn-lg flex-grow-1 addpadding bolder">
                <a href="">
                  {" "}
                  <font>Tech: Coming Soon</font>{" "}
                </a>
        Severity: Major
        Found in src/components/LessonList/index.js and 7 other locations - About 1 hr to fix
        src/components/LessonList/index.js on lines 52..57
        src/components/LessonList/index.js on lines 58..63
        src/components/LessonList/index.js on lines 81..86
        src/components/LessonList/index.js on lines 87..92
        src/components/LessonList/index.js on lines 115..120
        src/components/LessonList/index.js on lines 127..132
        src/components/LessonList/index.js on lines 143..148

        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

          await fetch(url)
            .then((response) => {
              if (!response.ok) {
                throw new Error("Cannot fetch transcripts");
              } else return response.json();
        Severity: Major
        Found in src/containers/ChannelsLoader/getTranscripts.js and 1 other location - About 1 hr to fix
        src/containers/ChannelsLoader/getTranscripts.js on lines 22..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 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 8 locations. Consider refactoring.
        Open

              <button className="btn-secondary btn-lg flex-grow-1 addpadding bolder">
                <a href="">
                  {" "}
                  <font>Activities: Coming Soon</font>{" "}
                </a>
        Severity: Major
        Found in src/components/LessonList/index.js and 7 other locations - About 1 hr to fix
        src/components/LessonList/index.js on lines 52..57
        src/components/LessonList/index.js on lines 58..63
        src/components/LessonList/index.js on lines 81..86
        src/components/LessonList/index.js on lines 109..114
        src/components/LessonList/index.js on lines 115..120
        src/components/LessonList/index.js on lines 127..132
        src/components/LessonList/index.js on lines 143..148

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

              <button className="btn-primary btn-lg flex-grow-1 addpadding bolder">
                <a href="">
                  {" "}
                  <font>Tech: Coming Soon</font>{" "}
                </a>
        Severity: Major
        Found in src/components/LessonList/index.js and 7 other locations - About 1 hr to fix
        src/components/LessonList/index.js on lines 58..63
        src/components/LessonList/index.js on lines 81..86
        src/components/LessonList/index.js on lines 87..92
        src/components/LessonList/index.js on lines 109..114
        src/components/LessonList/index.js on lines 115..120
        src/components/LessonList/index.js on lines 127..132
        src/components/LessonList/index.js on lines 143..148

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

            if (this.props.loading) {
              return (
                <div className="text-center lead">
                  <p>Loading Stories...</p>
                  <Spinner />
        Severity: Major
        Found in src/containers/Apollo11Explorer/index.js and 2 other locations - About 1 hr to fix
        src/containers/DJ/index.js on lines 173..180
        src/containers/StoryViewer/index.js on lines 23..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 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 3 locations. Consider refactoring.
        Open

            if (this.state.loading) {
              return (
                <div className="text-center lead">
                  <p>Loading Story...</p>
                  <Spinner />
        Severity: Major
        Found in src/containers/StoryViewer/index.js and 2 other locations - About 1 hr to fix
        src/containers/Apollo11Explorer/index.js on lines 94..101
        src/containers/DJ/index.js on lines 173..180

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

              <button className="btn-secondary btn-lg flex-grow-1 addpadding bolder">
                <a href="">
                  {" "}
                  <font>Activities: Coming Soon</font>{" "}
                </a>
        Severity: Major
        Found in src/components/LessonList/index.js and 7 other locations - About 1 hr to fix
        src/components/LessonList/index.js on lines 52..57
        src/components/LessonList/index.js on lines 58..63
        src/components/LessonList/index.js on lines 81..86
        src/components/LessonList/index.js on lines 87..92
        src/components/LessonList/index.js on lines 109..114
        src/components/LessonList/index.js on lines 127..132
        src/components/LessonList/index.js on lines 143..148

        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

          await fetch(url)
            .then((response) => {
              if (!response.ok) {
                throw new Error("Cannot fetch transcripts");
              } else return response.text();
        Severity: Major
        Found in src/containers/ChannelsLoader/getTranscripts.js and 1 other location - About 1 hr to fix
        src/containers/ChannelsLoader/getTranscripts.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 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 8 locations. Consider refactoring.
        Open

              <button className="btn-secondary btn-lg flex-grow-1 addpadding bolder">
                <a href="">
                  {" "}
                  <font>Activities: Coming Soon</font>{" "}
                </a>
        Severity: Major
        Found in src/components/LessonList/index.js and 7 other locations - About 1 hr to fix
        src/components/LessonList/index.js on lines 52..57
        src/components/LessonList/index.js on lines 81..86
        src/components/LessonList/index.js on lines 87..92
        src/components/LessonList/index.js on lines 109..114
        src/components/LessonList/index.js on lines 115..120
        src/components/LessonList/index.js on lines 127..132
        src/components/LessonList/index.js on lines 143..148

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

              <button className="btn-info btn-lg flex-grow-1 addpadding bolder">
                <a href="">
                  {" "}
                  <font>History: Coming soon</font>{" "}
                </a>
        Severity: Major
        Found in src/components/LessonList/index.js and 7 other locations - About 1 hr to fix
        src/components/LessonList/index.js on lines 52..57
        src/components/LessonList/index.js on lines 58..63
        src/components/LessonList/index.js on lines 81..86
        src/components/LessonList/index.js on lines 87..92
        src/components/LessonList/index.js on lines 109..114
        src/components/LessonList/index.js on lines 115..120
        src/components/LessonList/index.js on lines 143..148

        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

            it("should display header", function() {
              var app = testTree(<AppHeader />);
              assert.equal(
                app
                  .get("appRouteTitle")
        Severity: Minor
        Found in src/containers/App/index-test.js and 1 other location - About 55 mins to fix
        src/containers/App/index-test.js on lines 18..26

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

        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