Showing 2,206 of 2,206 total issues

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

    describe('subheadline', () => {
      const data = {
        blocks: blocksSingleFragment('Plain subheadline', []),
        type: 'subheadline',
      };
Severity: Major
Found in src/app/legacy/containers/Headings/index.test.jsx and 1 other location - About 6 hrs to fix
src/app/legacy/containers/Headings/index.test.jsx on lines 95..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 164.

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

    describe('headline', () => {
      const data = {
        blocks: blocksSingleFragment('Plain headline', []),
        type: 'headline',
      };
Severity: Major
Found in src/app/legacy/containers/Headings/index.test.jsx and 1 other location - About 6 hrs to fix
src/app/legacy/containers/Headings/index.test.jsx on lines 117..139

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

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

File hi.test.js has 432 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable */
import moment from 'moment';
import './hi';

moment.locale('hi');
Severity: Minor
Found in src/app/legacy/psammead/psammead-locales/moment/hi.test.js - About 6 hrs to fix

    File sr.test.js has 432 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import moment from 'moment';
    import './sr';
    
    moment.locale('sr');
    
    
    Severity: Minor
    Found in src/app/legacy/psammead/psammead-locales/moment/sr.test.js - About 6 hrs to fix

      File sr-cyrl.test.js has 432 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import moment from 'moment';
      import './sr-cyrl';
      
      moment.locale('sr-cyrl');
      
      
      Severity: Minor
      Found in src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js - About 6 hrs to fix

        File ne.test.js has 430 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import moment from 'moment';
        import './ne';
        
        moment.locale('ne');
        
        
        Severity: Minor
        Found in src/app/legacy/psammead/psammead-locales/moment/ne.test.js - About 6 hrs to fix

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

          test('fromNow', () => {
            assert.equal(
              moment().subtract({ m: 1 }).fromNow(),
              '1 minute ago',
              '1 minute ago'
          src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 463..480

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

          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

          test('fromNow', () => {
            assert.equal(
              moment().add({ s: 30 }).fromNow(),
              'через несколько секунд',
              'in seconds'
          Severity: Major
          Found in src/app/legacy/psammead/psammead-locales/moment/ru.test.js and 1 other location - About 6 hrs to fix
          src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 293..310

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

          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

              describe('on server', () => {
                it('should return a 500 error code', () => {
                  setWindowValue('location', false);
          
                  return fetchPageData({ path: requestedPathname, pageType }).catch(
          Severity: Major
          Found in src/app/routes/utils/fetchPageData/index.test.js and 1 other location - About 6 hrs to fix
          src/app/routes/utils/fetchPageData/index.test.js on lines 198..220

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

          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

              describe('on client', () => {
                it('should return a 502 error code', () => {
                  setWindowValue('location', true);
          
                  return fetchPageData({ path: requestedPathname, pageType }).catch(
          Severity: Major
          Found in src/app/routes/utils/fetchPageData/index.test.js and 1 other location - About 6 hrs to fix
          src/app/routes/utils/fetchPageData/index.test.js on lines 173..196

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

          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

          File colorthief.js has 427 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*
          The colorthief module does not seem to be compatible with
          yarn v3 due to how it references github sub dependencies
          
          This file is from:
          Severity: Minor
          Found in src/app/hooks/useImageColour/colorthief.js - About 6 hrs to fix

            File gu.test.js has 426 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import moment from 'moment';
            import './gu';
            
            moment.locale('gu');
            
            
            Severity: Minor
            Found in src/app/legacy/psammead/psammead-locales/moment/gu.test.js - About 6 hrs to fix

              File pt-br.test.js has 425 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import moment from 'moment';
              import './pt-br';
              
              moment.locale('pt-br');
              
              
              Severity: Minor
              Found in src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js - About 6 hrs to fix

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

                        function u(e) {
                            var t = "function" == typeof Symbol && Symbol.iterator,
                                n = t && e[t],
                                r = 0;
                            if (n)
                Severity: Major
                Found in public/vendor/cwr.js and 3 other locations - About 6 hrs to fix
                public/vendor/cwr.js on lines 592..608
                public/vendor/cwr.js on lines 1276..1292
                public/vendor/cwr.js on lines 2611..2627

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

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

                        function c(e) {
                            var t = "function" == typeof Symbol && Symbol.iterator,
                                n = t && e[t],
                                r = 0;
                            if (n)
                Severity: Major
                Found in public/vendor/cwr.js and 3 other locations - About 6 hrs to fix
                public/vendor/cwr.js on lines 592..608
                public/vendor/cwr.js on lines 1295..1311
                public/vendor/cwr.js on lines 2611..2627

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

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

                                function h(e) {
                                    var t = "function" == typeof Symbol && Symbol.iterator,
                                        n = t && e[t],
                                        r = 0;
                                    if (n)
                Severity: Major
                Found in public/vendor/cwr.js and 3 other locations - About 6 hrs to fix
                public/vendor/cwr.js on lines 1276..1292
                public/vendor/cwr.js on lines 1295..1311
                public/vendor/cwr.js on lines 2611..2627

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

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

                        function Ee(e) {
                            var t = "function" == typeof Symbol && Symbol.iterator,
                                n = t && e[t],
                                r = 0;
                            if (n)
                Severity: Major
                Found in public/vendor/cwr.js and 3 other locations - About 6 hrs to fix
                public/vendor/cwr.js on lines 592..608
                public/vendor/cwr.js on lines 1276..1292
                public/vendor/cwr.js on lines 1295..1311

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

                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

                    describe('Unknown error within the data fetch, react router or its dependencies', () => {
                      const pageType = 'onDemandTVBrand';
                
                      beforeEach(() => {
                        mockRouteProps({
                Severity: Major
                Found in src/server/index.test.jsx and 1 other location - About 6 hrs to fix
                src/server/index.test.jsx on lines 814..838

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

                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

                    describe('Unknown error within the data fetch, react router or its dependencies', () => {
                      const pageType = 'onDemandTVEpisode';
                
                      beforeEach(() => {
                        mockRouteProps({
                Severity: Major
                Found in src/server/index.test.jsx and 1 other location - About 6 hrs to fix
                src/server/index.test.jsx on lines 702..726

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

                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

                themes has 45 functions (exceeds 20 allowed). Consider refactoring.
                Open

                export const themes = {
                  afaanoromoo: loadable(
                    () => import(/* webpackChunkName: "themes-afaanoromoo" */ './afaanoromoo'),
                  ),
                  afrique: loadable(
                Severity: Minor
                Found in src/app/components/ThemeProvider/themes/loadableConfig.ts - About 6 hrs to fix
                  Severity
                  Category
                  Status
                  Source
                  Language