soldotno/aurora-core

View on GitHub

Showing 41 of 41 total issues

Function renderApp has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const renderApp = () => {
    // Pull the state we need for rendering our app
    const {
      version = '',
      config = {},
Severity: Minor
Found in src/render/client.js - About 1 hr to fix

    Function withVisibilityDecorator has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function withVisibilityDecorator(Component) {
      class withVisibility extends React.Component {
        // Add a specific display name
        static displayName = `${getDisplayName(Component)}WithVisibility`;
    
    
    Severity: Minor
    Found in src/decorators/with-visibility.js - About 1 hr to fix

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

            const { config: {
              app: {
                options: {
                  modules = [],
                } = {},
      Severity: Major
      Found in src/render/client.js and 1 other location - About 1 hr to fix
      src/render/client.js on lines 272..278

      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

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

            const { config: {
              app: {
                options: {
                  modules = [],
                } = {},
      Severity: Major
      Found in src/render/client.js and 1 other location - About 1 hr to fix
      src/render/client.js on lines 320..326

      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

      Function renderClient has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

      export default function renderClient({
        getRoute = () => console.warn('No getRoute() method supplied to constructor'),
        getModule = () => console.warn('No getModule() method supplied to constructor'),
        isVisible = () => console.warn('No isVisible() method supplied to constructor'),
        settings = window.__settings,
      Severity: Minor
      Found in src/render/client.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 resolveData has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        return function resolveData(
          settings = {},
          config = {}
        ) {
          /**
      Severity: Minor
      Found in src/utils/resolve-data.js - About 1 hr to fix

        Function resolveModules has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          return function resolveModules(config) {
            /**
             * Clone the config object to avoid mutation
             */
            const configCopy = clone(config);
        Severity: Minor
        Found in src/utils/resolve-modules.js - About 1 hr to fix

          Function configureKarma has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var configureKarma = function(webpackConfig) {
            /**
             * Default if a webpack config was not passed
             */
            var webpackConfig = webpackConfig || webpackConfigDefault;
          Severity: Minor
          Found in karma.conf.js - About 1 hr to fix

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

                populateNextPage({
                  path = '/',
                  query = {},
                } = {}) {
                  return (dispatch, getState) => {
            Severity: Minor
            Found in src/actions/index.js - About 1 hr to fix

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

                    return new Promise((resolve) => {
                      resolvers.forEach((resolver) => {
                        set(configCopy, resolver.path, resolver.value);
                      });
              
              
              Severity: Major
              Found in src/utils/resolve-visibility.js and 1 other location - About 1 hr to fix
              src/utils/resolve-visibility.js on lines 87..93

              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

                    return new Promise((resolve) => {
                      resolvers.forEach((resolver) => {
                        set(configCopy, resolver.path, resolver.value);
                      });
              
              
              Severity: Major
              Found in src/utils/resolve-visibility.js and 1 other location - About 1 hr to fix
              src/utils/resolve-visibility.js on lines 49..55

              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 actions = [{
                      type: 'POPULATE_NEXT_PAGE_SUCCESS',
                      data: { modules: nextModules },
                      meta: { operation: 'append', version: '12345', pagination: { hasMore: false } }
                    }];
              Severity: Minor
              Found in src/reducers/index.test.client.js and 1 other location - About 55 mins to fix
              src/reducers/index.test.client.js on lines 416..420

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

              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 actions = [{
                      type: 'POPULATE_NEXT_PAGE_SUCCESS',
                      data: { config: nextConfig },
                      meta: { operation: 'merge', version: '12345', pagination: { hasMore: false } }
                    }];
              Severity: Minor
              Found in src/reducers/index.test.client.js and 1 other location - About 55 mins to fix
              src/reducers/index.test.client.js on lines 550..554

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

              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

                              modules: [{
                                type: 'demo-module',
                                options: {
                                  _dataOptions: {
                                    dataA: 5
              Severity: Major
              Found in src/utils/resolve-data.test.server.js and 2 other locations - About 50 mins to fix
              src/utils/resolve-data.test.server.js on lines 131..143
              src/utils/resolve-data.test.server.js on lines 143..155

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

              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

                              }, {
                                type: 'demo-module',
                                options: {
                                  _dataOptions: {
                                    dataB: 10
              Severity: Major
              Found in src/utils/resolve-data.test.server.js and 2 other locations - About 50 mins to fix
              src/utils/resolve-data.test.server.js on lines 119..131
              src/utils/resolve-data.test.server.js on lines 143..155

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

              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

                              }, {
                                type: 'demo-module',
                                options: {
                                  _dataOptions: {
                                    dataC: 15
              Severity: Major
              Found in src/utils/resolve-data.test.server.js and 2 other locations - About 50 mins to fix
              src/utils/resolve-data.test.server.js on lines 119..131
              src/utils/resolve-data.test.server.js on lines 131..143

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

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

              export default function getWithDataDecorator({
                fetchData = (() => Promise.resolve()),
                dataProp = 'data',
                loadingProp = 'isLoading',
                errorProp = 'error',
              Severity: Minor
              Found in src/decorators/with-data.js - About 45 mins 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

                    const actions = [{
                      type: 'POPULATE_NEXT_PAGE_SUCCESS',
                      data: { config: nextConfig },
                      meta: { version: '12345', pagination: { hasMore: false } }
                    }];
              Severity: Minor
              Found in src/reducers/index.test.client.js and 1 other location - About 40 mins to fix
              src/reducers/index.test.client.js on lines 157..161

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

                    const actions = [{
                      type: 'REFRESH_CONFIG_SUCCESS',
                      data: { config: nextConfig },
                      meta: { version: '12345', pagination: { hasMore: true } }
                    }];
              Severity: Minor
              Found in src/reducers/index.test.client.js and 1 other location - About 40 mins to fix
              src/reducers/index.test.client.js on lines 700..704

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

                      {
                        loader: 'babel-loader',
                        options: {
                          babelrc: false,
                          presets: [
              Severity: Minor
              Found in webpack.config.js and 1 other location - About 35 mins to fix
              webpack.config.js on lines 117..140

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

              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