Showing 2,206 of 2,206 total issues

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

  if (rawDuration && !isInline) {
    const separator = ',';
    const duration = moment.duration(rawDuration, 'seconds');
    const durationString = formatDuration({ duration, separator });
    const durationTranslation = mediaTranslations.duration || '';
Severity: Major
Found in src/app/legacy/containers/StoryPromo/LinkContents/index.jsx and 1 other location - About 3 hrs to fix
src/app/legacy/components/OptimoPromos/Content/index.jsx on lines 39..50

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

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

                    this.AnonymousCredentialsProvider = function() {
                        return _(t, void 0, void 0, (function() {
                            var e = this;
                            return O(this, (function(t) {
                                return [2, new Promise((function(t, n) {
Severity: Major
Found in public/vendor/cwr.js and 1 other location - About 3 hrs to fix
public/vendor/cwr.js on lines 1941..1952

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

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

                    this.AnonymousCredentialsProvider = function() {
                        return k(t, void 0, void 0, (function() {
                            var e = this;
                            return L(this, (function(t) {
                                return [2, new Promise((function(t, n) {
Severity: Major
Found in public/vendor/cwr.js and 1 other location - About 3 hrs to fix
public/vendor/cwr.js on lines 1743..1754

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

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

  if (mediaDuration) {
    const separator = ',';
    const duration = moment.duration(mediaDuration, 'seconds');
    const durationString = formatDuration({ duration, separator });
    const durationTranslation = mediaTranslations.duration || '';
Severity: Major
Found in src/app/legacy/components/OptimoPromos/Content/index.jsx and 1 other location - About 3 hrs to fix
src/app/legacy/containers/StoryPromo/LinkContents/index.jsx on lines 42..53

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

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 p has 79 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        for (var p = function() {
                function t(e) {
                    var t = (void 0 === e ? {} : e).requestTimeout;
                    this.requestTimeout = t
                }
Severity: Major
Found in public/vendor/cwr.js - About 3 hrs to fix

    File index.test.tsx has 298 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React from 'react';
    import {
      act,
      render,
    } from '#app/components/react-testing-library-with-providers';
    Severity: Minor
    Found in ws-nextjs-app/pages/[service]/send/[id]/FormField/index.test.tsx - About 3 hrs to fix

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

        ${({ dir }) =>
          `
          @media (min-width: ${GEL_GROUP_0_SCREEN_WIDTH_MIN}){
            margin-${dir === 'ltr' ? 'left' : 'right'}: ${GEL_SPACING};
          }
      Severity: Major
      Found in src/app/legacy/components/ScrollablePromo/index.jsx and 1 other location - About 3 hrs to fix
      src/app/legacy/components/ScrollablePromo/PromoList/index.jsx on lines 72..79

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

      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

        ${({ dir }) => `@media (min-width: ${GEL_GROUP_0_SCREEN_WIDTH_MIN}){
            margin-${dir === 'ltr' ? 'left' : 'right'}: ${GEL_SPACING};
          }
          @media (min-width: ${GEL_GROUP_2_SCREEN_WIDTH_MIN}){
            margin-${dir === 'ltr' ? `left` : `right`}: ${GEL_SPACING_DBL};   
      src/app/legacy/components/ScrollablePromo/index.jsx on lines 46..57

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

      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 presign has 78 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                      return e.prototype.presign = function(e, t) {
                          return void 0 === t && (t = {}), be(this, void 0, void 0, (function() {
                              var n,
                                  r,
                                  o,
      Severity: Major
      Found in public/vendor/cwr.js - About 3 hrs to fix

        Function setupNodeEvents has 78 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            setupNodeEvents(on, config) {
              if (!config.env.APP_ENV) {
                config.env.APP_ENV = 'local';
              }
        
        
        Severity: Major
        Found in cypress.config.ts - About 3 hrs to fix

          Function snapshotTests has 78 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const snapshotTests = (Component, additionalProps) => {
            shouldMatchSnapshot(
              'should render landscape image correctly',
              <Component
                alt={landscape.alt}

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

            test('format month', () => {
              const expected =
                'January Jan_February Feb_March Mar_April Apr_May May_June Jun_July Jul_August Aug_September Sep_October Oct_November Nov_December Dec'.split(
                  '_'
                );
            src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
            src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
            src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
            src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
            src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
            src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
            src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
            src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
            src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
            src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

            test('format month', () => {
              const expected =
                'Yanvar yan_Fevral fev_Mart mar_Aprel apr_May may_Iyun iyn_Iyul iyl_Avqust avq_Sentyabr sen_Oktyabr okt_Noyabr noy_Dekabr dek'.split(
                  '_'
                );
            Severity: Major
            Found in src/app/legacy/psammead/psammead-locales/moment/az.test.js and 21 other locations - About 3 hrs to fix
            src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
            src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
            src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
            src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
            src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
            src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
            src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
            src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
            src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
            src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

            test('format month', () => {
              const expected =
                'Sẹ́rẹ́ Sẹ́r_Èrèlè Èrl_Ẹrẹ̀nà Ẹrn_Ìgbé Ìgb_Èbibi Èbi_Òkùdu Òkù_Agẹmo Agẹ_Ògún Ògú_Owewe Owe_Ọ̀wàrà Ọ̀wà_Bélú Bél_Ọ̀pẹ̀̀ Ọ̀pẹ̀̀'.split(
                  '_'
                );
            Severity: Major
            Found in src/app/legacy/psammead/psammead-locales/moment/yo.test.js and 21 other locations - About 3 hrs to fix
            src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
            src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
            src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
            src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
            src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
            src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
            src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
            src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
            src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
            src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
            src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

            test('format month', () => {
              const expected =
                'enero ene._febrero feb._marzo mar._abril abr._mayo may._junio jun._julio jul._agosto ago._septiembre sep._octubre oct._noviembre nov._diciembre dic.'.split(
                  '_'
                );
            Severity: Major
            Found in src/app/legacy/psammead/psammead-locales/moment/es.test.js and 21 other locations - About 3 hrs to fix
            src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
            src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
            src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
            src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
            src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
            src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
            src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
            src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
            src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
            src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

            test('format month', () => {
              const expected =
                'ஜனவரி ஜனவரி_பிப்ரவரி பிப்ரவரி_மார்ச் மார்ச்_ஏப்ரல் ஏப்ரல்_மே மே_ஜூன் ஜூன்_ஜூலை ஜூலை_ஆகஸ்ட் ஆகஸ்ட்_செப்டெம்பர் செப்டெம்பர்_அக்டோபர் அக்டோபர்_நவம்பர் நவம்பர்_டிசம்பர் டிசம்பர்'.split(
                  '_'
                );
            Severity: Major
            Found in src/app/legacy/psammead/psammead-locales/moment/ta.test.js and 21 other locations - About 3 hrs to fix
            src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
            src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
            src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
            src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
            src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
            src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
            src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
            src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
            src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
            src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

            test('format month', () => {
              const expected =
                'janeiro jan_fevereiro fev_março mar_abril abr_maio mai_junho jun_julho jul_agosto ago_setembro set_outubro out_novembro nov_dezembro dez'.split(
                  '_'
                );
            src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
            src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
            src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
            src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
            src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
            src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
            src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
            src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
            src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
            src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

            test('format month', () => {
              const expected =
                'Januari Jan_Februari Feb_Machi Mac_Aprili Apr_Mei Mei_Juni Jun_Julai Jul_Agosti Ago_Septemba Sep_Oktoba Okt_Novemba Nov_Disemba Des'.split(
                  '_'
                );
            Severity: Major
            Found in src/app/legacy/psammead/psammead-locales/moment/sw.test.js and 21 other locations - About 3 hrs to fix
            src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
            src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
            src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
            src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
            src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
            src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
            src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
            src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
            src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
            src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

            test('format month', () => {
              const expected =
                'जनवरी जन._फेब्रुवरी फेब्रु._मार्च मार्च_एप्रिल अप्रि._मई मई_जुन जुन_जुलाई जुलाई._अगष्ट अग._सेप्टेम्बर सेप्ट._अक्टोबर अक्टो._नोभेम्बर नोभे._डिसेम्बर डिसे.'.split(
                  '_'
                );
            Severity: Major
            Found in src/app/legacy/psammead/psammead-locales/moment/ne.test.js and 21 other locations - About 3 hrs to fix
            src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
            src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
            src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
            src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
            src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
            src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
            src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
            src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
            src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
            src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
            src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

            test('format month', () => {
              const expected =
                'јануар јан._фебруар феб._март мар._април апр._мај мај_јун јун_јул јул_август авг._септембар сеп._октобар окт._новембар нов._децембар дец.'.split(
                  '_'
                );
            src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
            src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
            src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
            src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
            src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
            src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
            src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
            src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
            src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
            src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
            src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
            src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
            src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
            src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
            src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

            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