Showing 2,226 of 2,646 total issues

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

test('from', () => {
  const start = moment([2007, 1, 28]);

  assert.equal(
    start.from(moment([2007, 1, 28]).add({ s: 45 }), true),
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/so.test.js and 6 other locations - About 2 days to fix
src/app/legacy/psammead/psammead-locales/moment/am.test.js on lines 23..70
src/app/legacy/psammead/psammead-locales/moment/ha.test.js on lines 23..71
src/app/legacy/psammead/psammead-locales/moment/om.test.js on lines 23..70
src/app/legacy/psammead/psammead-locales/moment/ps.test.js on lines 27..74
src/app/legacy/psammead/psammead-locales/moment/rw.test.js on lines 23..71
src/app/legacy/psammead/psammead-locales/moment/ti.test.js on lines 24..72

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

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

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

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

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

Refactorings

Further Reading

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

export default () => {
  it('I can see the brand title', () => {
    const brandTitleEl = document.querySelector('h1 span span:first-child');

    expect(brandTitleEl).toBeInTheDocument();
Severity: Major
Found in src/integration/pages/onDemandAudioPage/commonEpisodeTests.js and 1 other location - About 2 days to fix
src/integration/pages/podcastPage/commonEpisodeTests.js on lines 1..45

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

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

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

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

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

Refactorings

Further Reading

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

export default () => {
  it('I can see the brand title', () => {
    const brandTitleEl = document.querySelector('h1 span span:first-child');

    expect(brandTitleEl).toBeInTheDocument();
Severity: Major
Found in src/integration/pages/podcastPage/commonEpisodeTests.js and 1 other location - About 2 days to fix
src/integration/pages/onDemandAudioPage/commonEpisodeTests.js on lines 1..45

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

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

export const bylineWithNoRole = [
  {
    type: 'contributor',
    model: {
      topicId: '',
Severity: Major
Found in src/app/pages/ArticlePage/fixtureData.js and 1 other location - About 2 days to fix
src/app/pages/ArticlePage/fixtureData.js on lines 865..996

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

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

export const bylineWithNoAuthor = [
  {
    type: 'contributor',
    model: {
      topicId: '',
Severity: Major
Found in src/app/pages/ArticlePage/fixtureData.js and 1 other location - About 2 days to fix
src/app/pages/ArticlePage/fixtureData.js on lines 732..863

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

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

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

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

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

Refactorings

Further Reading

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

const rowsTest = value => {
  describe('first section', () => {
    it(`should correctly split ${value} stories`, () => {
      const items = numberOfStories[value].input;
      const isFirstSection = true;
src/app/legacy/containers/IndexPageSection/utilities/filterAllowedItems.test.jsx on lines 134..172

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

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

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

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

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

Refactorings

Further Reading

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

const allowedItemsTest = value => {
  describe('first section', () => {
    it(`should return correct allowed items for ${value} stories`, () => {
      const items = numberOfStories[value].input;
      const isFirstSection = true;
src/app/legacy/containers/IndexPageSection/utilities/storyRowsSplitter.test.jsx on lines 475..513

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

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

test('meridiem invariant', () => {
  assert.equal(moment([2011, 2, 23, 2, 30]).format('a'), 'ਰਾਤ', 'before dawn');
  assert.equal(moment([2011, 2, 23, 9, 30]).format('a'), 'ਸਵੇਰ', 'morning');
  assert.equal(
    moment([2011, 2, 23, 14, 30]).format('a'),
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js and 6 other locations - About 2 days to fix
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 306..336
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 403..429
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 404..434
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 409..455
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 402..432
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 111..165

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

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

test('meridiem', () => {
  assert.equal(moment([2011, 2, 23, 2, 30]).format('a'), 'રાત', 'before dawn');
  assert.equal(moment([2011, 2, 23, 9, 30]).format('a'), 'સવાર', 'morning');
  assert.equal(moment([2011, 2, 23, 14, 30]).format('a'), 'બપોર', 'during day');
  assert.equal(moment([2011, 2, 23, 17, 30]).format('a'), 'સાંજ', 'evening');
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/gu.test.js and 6 other locations - About 2 days to fix
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 306..336
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 404..434
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 409..455
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 402..432
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 111..141
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 111..165

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

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

test('meridiem', () => {
  assert.equal(moment([2011, 2, 23, 2, 30]).format('a'), 'রাত', 'before dawn');
  assert.equal(moment([2011, 2, 23, 9, 30]).format('a'), 'সকাল', 'morning');
  assert.equal(
    moment([2011, 2, 23, 14, 30]).format('a'),
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/bn.test.js and 6 other locations - About 2 days to fix
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 403..429
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 404..434
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 409..455
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 402..432
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 111..141
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 111..165

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

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

test('meridiem', () => {
  assert.equal(moment([2011, 2, 23, 2, 30]).format('a'), 'राति', 'before dawn');
  assert.equal(moment([2011, 2, 23, 9, 30]).format('a'), 'बिहान', 'morning');
  assert.equal(
    moment([2011, 2, 23, 14, 30]).format('a'),
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ne.test.js and 6 other locations - About 2 days to fix
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 306..336
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 403..429
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 404..434
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 409..455
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 111..141
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 111..165

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

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

test('meridiem', () => {
  assert.equal(moment([2011, 2, 23, 2, 30]).format('a'), 'रात', 'before dawn');
  assert.equal(moment([2011, 2, 23, 9, 30]).format('a'), 'सुबह', 'morning');
  assert.equal(
    moment([2011, 2, 23, 14, 30]).format('a'),
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/hi.test.js and 6 other locations - About 2 days to fix
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 306..336
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 403..429
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 409..455
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 402..432
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 111..141
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 111..165

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

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

test('meridiem', () => {
  assert.equal(
    moment([2011, 2, 23, 2, 30]).format('a'),
    'पहाटे',
    'before dawn'
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/mr.test.js and 6 other locations - About 2 days to fix
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 306..336
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 403..429
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 404..434
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 402..432
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 111..141
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 111..165

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

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

test('meridiem invariant', () => {
  assert.equal(
    moment([2011, 2, 23, 2, 30]).format('a'),
    ' வைகறை',
    'before dawn'
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ta.test.js and 6 other locations - About 2 days to fix
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 306..336
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 403..429
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 404..434
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 409..455
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 402..432
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 111..141

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

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

storiesOf('Components/MediaIndicator/Video', module)
  .addDecorator(PageDecorator)
  .addDecorator(withKnobs)
  .addDecorator(withServicesKnob())
  .add(
src/app/legacy/psammead/psammead-media-indicator/src/index.stories.jsx on lines 73..117

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

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

storiesOf('Components/MediaIndicator/Audio', module)
  .addDecorator(PageDecorator)
  .addDecorator(withKnobs)
  .addDecorator(withServicesKnob())
  .add(
src/app/legacy/psammead/psammead-media-indicator/src/index.stories.jsx on lines 27..71

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

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

export const truncatedTextInSingleLink = [
  {
    id: '5d61cd4d',
    type: 'title',
    model: {
src/app/legacy/components/ScrollablePromo/helpers/fixtureData.js on lines 250..338

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

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

export const oneLinkOnly = [
  {
    id: '37565636',
    type: 'title',
    model: {
src/app/legacy/components/ScrollablePromo/helpers/fixtureData.js on lines 1007..1095

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

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

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

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

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

Refactorings

Further Reading

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

const styInput = {
  metadata: {
    type: 'STY',
    options: {
      allowAdvertising: true,
src/app/routes/cpsAsset/getInitialData/addRecommendationsBlock/index.test.js on lines 4..130

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

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

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

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

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

Refactorings

Further Reading

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

const styInput = {
  metadata: {
    type: 'STY',
    options: {
      allowAdvertising: true,
src/app/routes/cpsAsset/getInitialData/addMpuBlock/index.test.js on lines 4..130

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

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