Bartekus/R3Fuse

View on GitHub

Showing 7 of 7 total issues

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

  render() {
    const { data } = this.props;
    const posts = data.allPosts && data.allPosts.edges;
    const isLoading = data.loading ? 'Loading...' : null;
    return (
Severity: Major
Found in client/src/app.js - About 3 hrs to fix

    Function server has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    (async function server() {
      // Set up routes
      const router = (new KoaRouter())
        // Set-up a general purpose /ping route to check the server is alive
        .get('/ping', async ctx => {
    Severity: Major
    Found in client/kit/entry/server.js - About 2 hrs to fix

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

          conf.module.loaders.find(l => l.test.toString() === /\.jsx?$/.toString())
            .loaders.unshift({
              loader: 'react-hot-loader/webpack',
            });
      Severity: Major
      Found in client/kit/webpack/browser_dev.js and 2 other locations - About 50 mins to fix
      client/kit/webpack/browser_prod.js on lines 60..65
      client/kit/webpack/server.js on lines 45..52

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

      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

          conf.module.loaders.find(l => l.test.toString() === /\.(jpe?g|png|gif|svg)$/i.toString())
            .loaders.push({
              // `image-webpack-loader` is used on the server build even `emitFile`
              // on `fileLoader` disabled so that the correct hash can be generated.
              loader: 'image-webpack-loader',
      Severity: Major
      Found in client/kit/webpack/server.js and 2 other locations - About 50 mins to fix
      client/kit/webpack/browser_dev.js on lines 37..40
      client/kit/webpack/browser_prod.js on lines 60..65

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

      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

          config.module.loaders.find(l => l.test.toString() === /\.(jpe?g|png|gif|svg)$/i.toString())
            .loaders.push({
              loader: 'image-webpack-loader',
              // workaround for https://github.com/tcoopman/image-webpack-loader/issues/88
              options: {},
      Severity: Major
      Found in client/kit/webpack/browser_prod.js and 2 other locations - About 50 mins to fix
      client/kit/webpack/browser_dev.js on lines 37..40
      client/kit/webpack/server.js on lines 45..52

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

      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

                      use: [
                        {
                          loader: 'css-loader',
                          query: Object.assign({}, css.loaderDefaults, mod[1]),
                        },
      Severity: Minor
      Found in client/kit/webpack/browser_prod.js and 1 other location - About 30 mins to fix
      client/kit/webpack/server.js on lines 88..95

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

      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

                    loader: [
                      {
                        loader: 'css-loader/locals',
                        query: Object.assign({}, css.loaderDefaults, mod[1]),
                      },
      Severity: Minor
      Found in client/kit/webpack/server.js and 1 other location - About 30 mins to fix
      client/kit/webpack/browser_prod.js on lines 85..92

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

      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