Showing 2,206 of 2,206 total issues

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

test('calendar all else', () => {
  let weeksAgo = moment().subtract({ w: 1 });
  let weeksFromNow = moment().add({ w: 1 });

  assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

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

test('calendar all else', () => {
  let weeksAgo = moment().subtract({ w: 1 });
  let weeksFromNow = moment().add({ w: 1 });

  assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/si.test.js and 24 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

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

test('calendar all else', () => {
  let weeksAgo = moment().subtract({ w: 1 });
  let weeksFromNow = moment().add({ w: 1 });

  assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/sw.test.js and 24 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

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

test('calendar all else', () => {
  let weeksAgo = moment().subtract({ w: 1 });
  let weeksFromNow = moment().add({ w: 1 });

  assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ky.test.js and 24 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

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

test('calendar all else', () => {
  let weeksAgo = moment().subtract({ w: 1 });
  let weeksFromNow = moment().add({ w: 1 });

  assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ta.test.js and 24 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

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

test('calendar all else', () => {
  let weeksAgo = moment().subtract({ w: 1 });
  let weeksFromNow = moment().add({ w: 1 });

  assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/uz.test.js and 24 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

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 component', () => {
  it('should render correctly', () => {
    const { container } = render(
      <Headline script={latin} service="news">
        This is my headline.
Severity: Major
Found in src/app/legacy/psammead/psammead-headings/src/index.test.jsx and 1 other location - About 1 day to fix
src/app/legacy/psammead/psammead-paragraph/src/index.test.jsx on lines 8..38

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

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('Paragraph', () => {
  it('should render correctly', () => {
    const { container } = render(
      <Paragraph script={latin} service="news">
        This is text in a paragraph.
src/app/legacy/psammead/psammead-headings/src/index.test.jsx on lines 8..38

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

                function v(e, t) {
                    var n = "function" == typeof Symbol && e[Symbol.iterator];
                    if (!n)
                        return e;
                    var r,
Severity: Major
Found in public/vendor/cwr.js and 2 other locations - About 1 day to fix
public/vendor/cwr.js on lines 1023..1047
public/vendor/cwr.js on lines 2628..2652

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        function r(e, t) {
            var n = "function" == typeof Symbol && e[Symbol.iterator];
            if (!n)
                return e;
            var r,
Severity: Major
Found in public/vendor/cwr.js and 2 other locations - About 1 day to fix
public/vendor/cwr.js on lines 609..633
public/vendor/cwr.js on lines 2628..2652

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        function Ce(e, t) {
            var n = "function" == typeof Symbol && e[Symbol.iterator];
            if (!n)
                return e;
            var r,
Severity: Major
Found in public/vendor/cwr.js and 2 other locations - About 1 day to fix
public/vendor/cwr.js on lines 609..633
public/vendor/cwr.js on lines 1023..1047

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

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.test.js has 548 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { data as serbianFrontPageData } from '#data/serbian/frontpage/lat.json';
import { data as urduFrontPageData } from '#data/urdu/frontpage/index.json';
import {
  PHOTO_GALLERY_PAGE,
  MEDIA_ASSET_PAGE,

    File index.js has 534 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import Cookie from 'js-cookie';
    import { v4 as uuid } from 'uuid';
    import pathOr from 'ramda/src/pathOr';
    import path from 'ramda/src/path';
    import Url from 'url-parse';
    Severity: Major
    Found in src/app/lib/analyticsUtils/index.js - About 1 day to fix

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

                      this.getId = function(e) {
                          return i(t, void 0, void 0, (function() {
                              var t,
                                  n;
                              return s(this, (function(r) {
      Severity: Major
      Found in public/vendor/cwr.js and 1 other location - About 1 day to fix
      public/vendor/cwr.js on lines 1215..1230

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

      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.getOpenIdToken = function(e) {
                          return i(t, void 0, void 0, (function() {
                              var t,
                                  n;
                              return s(this, (function(r) {
      Severity: Major
      Found in public/vendor/cwr.js and 1 other location - About 1 day to fix
      public/vendor/cwr.js on lines 1199..1214

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

      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('Header Tests', () => {
            const serviceName = config[service].name;
            // limit number of tests to 2 services for navigation toggling
            const testMobileNav =
              serviceName === 'ukchina' || serviceName === 'persian';
      Severity: Major
      Found in cypress/e2e/pages/testsForAllAMPPages.js and 1 other location - About 1 day to fix
      cypress/e2e/pages/testsForAllCanonicalPages.js on lines 30..52

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 209.

      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('Header Tests', () => {
          const serviceName = config[service].name;
          // limit number of tests to 2 services for navigation toggling
          const testMobileNav =
            serviceName === 'ukchina' || serviceName === 'persian';
      Severity: Major
      Found in cypress/e2e/pages/testsForAllCanonicalPages.js and 1 other location - About 1 day to fix
      cypress/e2e/pages/testsForAllAMPPages.js on lines 12..39

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

      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

                          r = function(e, t) {
                              var n = {};
                              for (var r in e)
                                  Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
                              if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
      Severity: Major
      Found in public/vendor/cwr.js and 1 other location - About 1 day to fix
      public/vendor/cwr.js on lines 438..448

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

      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

                      function s(e, t) {
                          var n = {};
                          for (var r in e)
                              Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
                          if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
      Severity: Major
      Found in public/vendor/cwr.js and 1 other location - About 1 day to fix
      public/vendor/cwr.js on lines 2765..2775

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

      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.test.js has 522 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import injectCspHeader from '.';
      
      import {
        generateChildSrc,
        generateConnectSrc,
      Severity: Major
      Found in src/server/utilities/cspHeader/index.test.js - About 1 day to fix
        Severity
        Category
        Status
        Source
        Language