UTD-CRSS/app.exploreapollo.org

View on GitHub
src/components/DayDisplay/index.js

Summary

Maintainability
F
3 days
Test Coverage

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

  render() {
    let imgUrl;
    let label;
    let text;
    const url = this.props.url;
Severity: Major
Found in src/components/DayDisplay/index.js - About 5 hrs to fix

    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

    There are no issues that match your filters.

    Category
    Status