kimjuny/koa-react-universal

View on GitHub

Showing 21 of 21 total issues

Function serve has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
Open

function serve (root, opts) {
  opts = opts || {}

  assert(root, 'root directory is required to serve files')

Severity: Minor
Found in src/server/infrastructure/middlewares/statics.js - About 5 hrs 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

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

  constructor() {
    super();
    this.state = { value: '' };
    this.onChange = this.onChange.bind(this);
    this.onEnter = this.onEnter.bind(this);
Severity: Major
Found in src/client/components/common/Navigator.jsx and 1 other location - About 2 hrs to fix
src/client/containers/Home.jsx on lines 12..17

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 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

  constructor() {
    super();
    this.state = { search: '' };
    this.onChange = this.onChange.bind(this);
    this.onEnter = this.onEnter.bind(this);
Severity: Major
Found in src/client/containers/Home.jsx and 1 other location - About 2 hrs to fix
src/client/components/common/Navigator.jsx on lines 15..20

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

Function serve has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function serve (root, opts) {
  opts = opts || {}

  assert(root, 'root directory is required to serve files')

Severity: Minor
Found in src/server/infrastructure/middlewares/statics.js - About 1 hr to fix

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

                <svg aria-hidden="true" fill="white" height="32" version="1.1" viewBox="0 0 16 16" width="32">
                  <path fillRule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z" />
                </svg>
    Severity: Major
    Found in src/client/components/common/Navigator.jsx and 1 other location - About 1 hr to fix
    src/client/components/repository/Entry.jsx on lines 25..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 60.

    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

          <svg className="start" height="20" role="img" version="1.1" viewBox="0 0 14 16" width="15">
            <path fillRule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z" />
          </svg>
    Severity: Major
    Found in src/client/components/repository/Entry.jsx and 1 other location - About 1 hr to fix
    src/client/components/common/Navigator.jsx on lines 44..46

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

    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 match has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

    const match = async (ctx, routes, dispatch) => {
      for (let i = 0; i < routes.length; i += 1) {
        const route = routes[i];
        if (matchPath(ctx.path, route)) {
          if (typeof route.load === 'function') {
    Severity: Minor
    Found in src/server/infrastructure/middlewares/render.jsx - 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 render has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const render = async (ctx) => {
      try {
        const store = configureStore();
    
        if (await match(ctx, routes, store.dispatch)) {
    Severity: Minor
    Found in src/server/infrastructure/middlewares/render.jsx - About 1 hr to fix

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

        render() {
          return (
            <div className="navigator">
              <div className="content">
                <Link className="icon" to="/">
      Severity: Minor
      Found in src/client/components/common/Navigator.jsx - About 1 hr to fix

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

              <dd>
                <span className="language">PHP</span>
                <span className="count">207</span>
              </dd>
        Severity: Major
        Found in src/client/components/repository/Languages.jsx and 9 other locations - About 40 mins to fix
        src/client/components/repository/Languages.jsx on lines 8..11
        src/client/components/repository/Languages.jsx on lines 12..15
        src/client/components/repository/Languages.jsx on lines 16..19
        src/client/components/repository/Languages.jsx on lines 20..23
        src/client/components/repository/Languages.jsx on lines 24..27
        src/client/components/repository/Languages.jsx on lines 28..31
        src/client/components/repository/Languages.jsx on lines 36..39
        src/client/components/repository/Languages.jsx on lines 40..43
        src/client/components/repository/Languages.jsx on lines 44..47

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

              <dd>
                <span className="language">CoffeeScript</span>
                <span className="count">133</span>
              </dd>
        Severity: Major
        Found in src/client/components/repository/Languages.jsx and 9 other locations - About 40 mins to fix
        src/client/components/repository/Languages.jsx on lines 8..11
        src/client/components/repository/Languages.jsx on lines 12..15
        src/client/components/repository/Languages.jsx on lines 16..19
        src/client/components/repository/Languages.jsx on lines 20..23
        src/client/components/repository/Languages.jsx on lines 24..27
        src/client/components/repository/Languages.jsx on lines 28..31
        src/client/components/repository/Languages.jsx on lines 32..35
        src/client/components/repository/Languages.jsx on lines 36..39
        src/client/components/repository/Languages.jsx on lines 44..47

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

              <dd>
                <span className="language">Vue</span>
                <span className="count">792</span>
              </dd>
        Severity: Major
        Found in src/client/components/repository/Languages.jsx and 9 other locations - About 40 mins to fix
        src/client/components/repository/Languages.jsx on lines 8..11
        src/client/components/repository/Languages.jsx on lines 12..15
        src/client/components/repository/Languages.jsx on lines 16..19
        src/client/components/repository/Languages.jsx on lines 20..23
        src/client/components/repository/Languages.jsx on lines 28..31
        src/client/components/repository/Languages.jsx on lines 32..35
        src/client/components/repository/Languages.jsx on lines 36..39
        src/client/components/repository/Languages.jsx on lines 40..43
        src/client/components/repository/Languages.jsx on lines 44..47

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

              <dd>
                <span className="language">Python</span>
                <span className="count">124</span>
              </dd>
        Severity: Major
        Found in src/client/components/repository/Languages.jsx and 9 other locations - About 40 mins to fix
        src/client/components/repository/Languages.jsx on lines 8..11
        src/client/components/repository/Languages.jsx on lines 12..15
        src/client/components/repository/Languages.jsx on lines 16..19
        src/client/components/repository/Languages.jsx on lines 20..23
        src/client/components/repository/Languages.jsx on lines 24..27
        src/client/components/repository/Languages.jsx on lines 28..31
        src/client/components/repository/Languages.jsx on lines 32..35
        src/client/components/repository/Languages.jsx on lines 36..39
        src/client/components/repository/Languages.jsx on lines 40..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 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 10 locations. Consider refactoring.
        Open

              <dd>
                <span className="language">Javascript</span>
                <span className="count">37524</span>
              </dd>
        Severity: Major
        Found in src/client/components/repository/Languages.jsx and 9 other locations - About 40 mins to fix
        src/client/components/repository/Languages.jsx on lines 12..15
        src/client/components/repository/Languages.jsx on lines 16..19
        src/client/components/repository/Languages.jsx on lines 20..23
        src/client/components/repository/Languages.jsx on lines 24..27
        src/client/components/repository/Languages.jsx on lines 28..31
        src/client/components/repository/Languages.jsx on lines 32..35
        src/client/components/repository/Languages.jsx on lines 36..39
        src/client/components/repository/Languages.jsx on lines 40..43
        src/client/components/repository/Languages.jsx on lines 44..47

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

              <dd>
                <span className="language">Ruby</span>
                <span className="count">487</span>
              </dd>
        Severity: Major
        Found in src/client/components/repository/Languages.jsx and 9 other locations - About 40 mins to fix
        src/client/components/repository/Languages.jsx on lines 8..11
        src/client/components/repository/Languages.jsx on lines 12..15
        src/client/components/repository/Languages.jsx on lines 16..19
        src/client/components/repository/Languages.jsx on lines 20..23
        src/client/components/repository/Languages.jsx on lines 24..27
        src/client/components/repository/Languages.jsx on lines 32..35
        src/client/components/repository/Languages.jsx on lines 36..39
        src/client/components/repository/Languages.jsx on lines 40..43
        src/client/components/repository/Languages.jsx on lines 44..47

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

              <dd>
                <span className="language">C#</span>
                <span className="count">133</span>
              </dd>
        Severity: Major
        Found in src/client/components/repository/Languages.jsx and 9 other locations - About 40 mins to fix
        src/client/components/repository/Languages.jsx on lines 8..11
        src/client/components/repository/Languages.jsx on lines 12..15
        src/client/components/repository/Languages.jsx on lines 16..19
        src/client/components/repository/Languages.jsx on lines 20..23
        src/client/components/repository/Languages.jsx on lines 24..27
        src/client/components/repository/Languages.jsx on lines 28..31
        src/client/components/repository/Languages.jsx on lines 32..35
        src/client/components/repository/Languages.jsx on lines 40..43
        src/client/components/repository/Languages.jsx on lines 44..47

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

              <dd>
                <span className="language">Typescript</span>
                <span className="count">1838</span>
              </dd>
        Severity: Major
        Found in src/client/components/repository/Languages.jsx and 9 other locations - About 40 mins to fix
        src/client/components/repository/Languages.jsx on lines 8..11
        src/client/components/repository/Languages.jsx on lines 12..15
        src/client/components/repository/Languages.jsx on lines 20..23
        src/client/components/repository/Languages.jsx on lines 24..27
        src/client/components/repository/Languages.jsx on lines 28..31
        src/client/components/repository/Languages.jsx on lines 32..35
        src/client/components/repository/Languages.jsx on lines 36..39
        src/client/components/repository/Languages.jsx on lines 40..43
        src/client/components/repository/Languages.jsx on lines 44..47

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

              <dd>
                <span className="language">HTML</span>
                <span className="count">1192</span>
              </dd>
        Severity: Major
        Found in src/client/components/repository/Languages.jsx and 9 other locations - About 40 mins to fix
        src/client/components/repository/Languages.jsx on lines 8..11
        src/client/components/repository/Languages.jsx on lines 12..15
        src/client/components/repository/Languages.jsx on lines 16..19
        src/client/components/repository/Languages.jsx on lines 24..27
        src/client/components/repository/Languages.jsx on lines 28..31
        src/client/components/repository/Languages.jsx on lines 32..35
        src/client/components/repository/Languages.jsx on lines 36..39
        src/client/components/repository/Languages.jsx on lines 40..43
        src/client/components/repository/Languages.jsx on lines 44..47

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

              <dd>
                <span className="language">CSS</span>
                <span className="count">2021</span>
              </dd>
        Severity: Major
        Found in src/client/components/repository/Languages.jsx and 9 other locations - About 40 mins to fix
        src/client/components/repository/Languages.jsx on lines 8..11
        src/client/components/repository/Languages.jsx on lines 16..19
        src/client/components/repository/Languages.jsx on lines 20..23
        src/client/components/repository/Languages.jsx on lines 24..27
        src/client/components/repository/Languages.jsx on lines 28..31
        src/client/components/repository/Languages.jsx on lines 32..35
        src/client/components/repository/Languages.jsx on lines 36..39
        src/client/components/repository/Languages.jsx on lines 40..43
        src/client/components/repository/Languages.jsx on lines 44..47

        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

        Trailing spaces not allowed.
        Open

         * @param {*} url 
        Severity: Minor
        Found in src/shared/utils/url.js by eslint

        disallow trailing whitespace at the end of lines (no-trailing-spaces)

        Sometimes in the course of editing files, you can end up with extra whitespace at the end of lines. These whitespace differences can be picked up by source control systems and flagged as diffs, causing frustration for developers. While this extra whitespace causes no functional issues, many code conventions require that trailing spaces be removed before check-in.

        Rule Details

        This rule disallows trailing whitespace (spaces, tabs, and other Unicode whitespace characters) at the end of lines.

        Examples of incorrect code for this rule:

        /*eslint no-trailing-spaces: "error"*/
        
        var foo = 0;//•••••
        var baz = 5;//••
        //•••••

        Examples of correct code for this rule:

        /*eslint no-trailing-spaces: "error"*/
        
        var foo = 0;
        var baz = 5;

        Options

        This rule has an object option:

        • "skipBlankLines": false (default) disallows trailing whitespace on empty lines
        • "skipBlankLines": true allows trailing whitespace on empty lines

        skipBlankLines

        Examples of correct code for this rule with the { "skipBlankLines": true } option:

        /*eslint no-trailing-spaces: ["error", { "skipBlankLines": true }]*/
        
        var foo = 0;
        var baz = 5;
        //•••••

        Source: http://eslint.org/docs/rules/

        Severity
        Category
        Status
        Source
        Language