Showing 2,206 of 2,206 total issues

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

test('format week', () => {
  const expected =
    'Jumapili Jpl J2_Jumatatu Jtat J3_Jumanne Jnne J4_Jumatano Jtan J5_Alhamisi Alh Al_Ijumaa Ijm Ij_Jumamosi Jmos J1'.split(
      '_'
    );
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/sw.test.js and 22 other locations - About 3 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..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 101.

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

test('format week', () => {
  const expected =
    'ඉරිදා ඉරි ඉ_සඳුදා සඳු ස_අඟහරුවාදා අඟ අ_බදාදා බදා බ_බ්‍රහස්පතින්දා බ්‍රහ බ්‍ර_සිකුරාදා සිකු සි_සෙනසුරාදා සෙන සෙ'.split(
      '_'
    );
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/si.test.js and 22 other locations - About 3 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..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 101.

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

test('format week', () => {
  const expected =
    'воскресенье вс вс_понедельник пн пн_вторник вт вт_среда ср ср_четверг чт чт_пятница пт пт_суббота сб сб'.split(
      '_'
    );
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ru.test.js and 22 other locations - About 3 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..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 101.

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

test('format week', () => {
  const expected =
    'Якшанба Якш Як_Душанба Душ Ду_Сешанба Сеш Се_Чоршанба Чор Чо_Пайшанба Пай Па_Жума Жум Жу_Шанба Шан Ша'.split(
      '_'
    );
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/uz.test.js and 22 other locations - About 3 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..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 101.

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

test('format week', () => {
  const expected =
    'Жекшемби Жек Жк_Дүйшөмбү Дүй Дй_Шейшемби Шей Шй_Шаршемби Шар Шр_Бейшемби Бей Бй_Жума Жум Жм_Ишемби Ише Иш'.split(
      '_'
    );
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ky.test.js and 22 other locations - About 3 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..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 101.

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

test('format week', () => {
  const expected =
    'Sọnde Sọn Su_Mọnde Mọn Mọ_Tuzde Tuz Tu_Wenesde We We_Tọsde Tọs Tọ_Fraịde Frai Fr_Satọde Sat Sa'.split(
      '_'
    );
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ig.test.js and 22 other locations - About 3 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..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 101.

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('Embed', () => {
    const embedComponent = document.querySelector('[data-testid="embed"]');
    if (service === 'hindi') {
      it('should be in the document', () => {
        expect(embedComponent).toBeInTheDocument();
Severity: Major
Found in src/integration/pages/homePage/canonicalTests.js and 1 other location - About 3 hrs to fix
src/integration/pages/homePage/canonicalTests.js on lines 32..44

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

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('Radio Schedule', () => {
    const radioScheduleComponent = document.getElementById('Radio-Schedule');

    if (service === 'arabic') {
      it('should be in the document', () => {
Severity: Major
Found in src/integration/pages/homePage/canonicalTests.js and 1 other location - About 3 hrs to fix
src/integration/pages/homePage/canonicalTests.js 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 101.

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

            914: function(e, t, n) {
                "use strict";
                Object.defineProperty(t, "__esModule", {
                    value: !0
                }),
Severity: Major
Found in public/vendor/cwr.js - About 3 hrs to fix

    Function ArticlePage has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

    const ArticlePage = ({ pageData }: { pageData: Article }) => {
      const { isApp, pageType, service, isAmp, id } = useContext(RequestContext);
    
      const {
        articleAuthor,
    Severity: Minor
    Found in src/app/pages/ArticlePage/ArticlePage.tsx - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

      describe('Card Content', () => {
        assertTypeOfElement(PodcastPromo.Card.Content, 'div');
        it('should match snapshot', () => {
          const { container } = render(
            <PodcastPromo.Card.Content>Content</PodcastPromo.Card.Content>,
    src/app/legacy/containers/PodcastPromo/components/index.test.jsx on lines 75..85

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

    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

    moment.updateLocale('sr', {
      longDateFormat: {
        LL: 'D MMMM YYYY',
        LLL: 'D MMMM YYYY H:mm',
        LLLL: 'dddd, D MMMM YYYY H:mm',
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/sr.js and 1 other location - About 3 hrs to fix
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.js on lines 4..19

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

    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

                timeTable
                  .sort((a, b) => {
                    if (a.service > b.service) {
                      return 1;
                    }
    Severity: Major
    Found in scripts/mostReadCollectionTimes.js and 1 other location - About 3 hrs to fix
    scripts/mostReadAndWatchedCollectionData.js on lines 103..105

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

    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

    moment.updateLocale('sr-cyrl', {
      longDateFormat: {
        LL: 'D MMMM YYYY',
        LLL: 'D MMMM YYYY H:mm',
        LLLL: 'dddd, D MMMM YYYY H:mm',
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.js and 1 other location - About 3 hrs to fix
    src/app/legacy/psammead/psammead-locales/moment/sr.js on lines 4..19

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

    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

      it('should not add id to items with ids', () => {
        const actual = addIdsToItems({
          pathToItems: ['content', 'model', 'blocks'],
        })(fixtureB);
        const expected = {
    src/app/routes/utils/sharedDataTransformers/addIdsToItems/index.test.js on lines 52..65

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 100.

    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

                timeTable.forEach(result => {
                  csvContents += `\n${result.service},${result.type},${result.link},${result.generated},${result.minutesSinceGenerated},${result.lastRecordTimestamp},${result.firstRecordTimestamp},${result.collectionTimeWindowInMinutes},${result.totalRecords},${result.counts}`;
                });
    Severity: Major
    Found in scripts/mostReadAndWatchedCollectionData.js and 1 other location - About 3 hrs to fix
    scripts/mostReadCollectionTimes.js on lines 102..120

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

    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('Card Image', () => {
        assertTypeOfElement(PodcastPromo.Card.ImageWrapper, 'div');
        it('should match snapshot', () => {
          const { container } = render(
            <PodcastPromo.Card.ImageWrapper>
    src/app/legacy/containers/PodcastPromo/components/index.test.jsx on lines 41..49

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

    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

      it('should add ids to all items without ids', () => {
        const actual = addIdsToItems({
          pathToItems: ['content', 'model', 'blocks'],
        })(fixtureA);
        const expected = {
    src/app/routes/utils/sharedDataTransformers/addIdsToItems/index.test.js on lines 67..78

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

    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 index.jsx has 302 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable camelcase */
    import express from 'express';
    import compression from 'compression';
    import ramdaPath from 'ramda/src/path';
    import omit from 'ramda/src/omit';
    Severity: Minor
    Found in src/server/index.jsx - About 3 hrs to fix

      Function P has 81 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  P = function() {
                      function e(e) {
                          var t = this;
                          this.ChainAnonymousCredentialsProvider = function() {
                              return _(t, void 0, void 0, (function() {
      Severity: Major
      Found in public/vendor/cwr.js - About 3 hrs to fix
        Severity
        Category
        Status
        Source
        Language