ahbeng/NUSMods

View on GitHub
website/src/views/contribute/ContributeContainer/ContributeContainer.tsx

Summary

Maintainability
C
1 day
Test Coverage

File ContributeContainer.tsx has 291 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { memo, Fragment, FC } from 'react';
import { connect } from 'react-redux';
import classnames from 'classnames';
import { Link } from 'react-router-dom';
import { flatten, map, mapValues, values } from 'lodash';

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

          <section>
            <header>
              <VenueIcon />
              <h3>Map the School</h3>
            </header>
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 169..181

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

    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

          <section>
            <header>
              <ChatIcon />
              <h3>Give Us Feedback</h3>
            </header>
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 103..115

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

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

              <ExternalLink
                className="btn btn-outline-primary"
                href="https://github.com/nusmodifications/nusmods/blob/master/CONTRIBUTING.md"
              >
                <h4>Contribution Guide</h4>
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 235..241
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 242..248
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 267..273
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 281..284
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 285..291

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

              <ExternalLink
                className="btn btn-outline-primary"
                href="https://github.com/nusmodifications/nusmods/issues/new?template=Feature_request.md"
              >
                <h4>Feature Request</h4>
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 235..241
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 267..273
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 274..280
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 281..284
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 285..291

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

              <ExternalLink
                className="btn btn-outline-primary"
                href="https://github.com/nusmodifications/nusmods/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22+-label%3ATaken"
              >
                <h4>Good First Issues</h4>
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 235..241
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 242..248
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 274..280
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 281..284
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 285..291

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

              <ExternalLink
                className="btn btn-outline-primary"
                href="https://groups.google.com/forum/#!forum/nusmods"
              >
                <h4>Mailing List</h4>
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 235..241
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 242..248
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 267..273
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 274..280
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 281..284

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

              <ExternalLink className="btn btn-outline-primary" href="https://t.me/NUSMods">
                <h4>Telegram Chat</h4>
                <p>Talk to us about NUSMods design and development</p>
              </ExternalLink>
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 235..241
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 242..248
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 267..273
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 274..280
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 285..291

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

              <ExternalLink
                className="btn btn-outline-primary"
                href="https://github.com/nusmodifications/nusmods/issues/new?template=Bug_report.md"
              >
                <h4>Bug Report</h4>
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 242..248
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 267..273
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 274..280
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 281..284
    website/src/views/contribute/ContributeContainer/ContributeContainer.tsx on lines 285..291

    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

    There are no issues that match your filters.

    Category
    Status