src/app/legacy/containers/SocialEmbed/index.stories.jsx

Summary

Maintainability
C
1 day
Test Coverage

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

export const FacebookPostAmpExample = (_, { service }) => (
  <Component
    isAmp
    blocks={[facebookPostBlockEmbed]}
    source="https://www.facebook.com/RickAstley/posts/545713756920775"
Severity: Major
Found in src/app/legacy/containers/SocialEmbed/index.stories.jsx and 4 other locations - About 50 mins to fix
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 52..59
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 94..101
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 112..119
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 148..155

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

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

export const TikTokWithConsentBannerAmp = (_, { service }) => (
  <Component
    isAmp
    blocks={[tiktokBlockEmbed]}
    source="https://www.tiktok.com/@cuppymusic/video/7086167423639997701"
Severity: Major
Found in src/app/legacy/containers/SocialEmbed/index.stories.jsx and 4 other locations - About 50 mins to fix
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 52..59
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 112..119
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 130..137
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 148..155

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

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

export const YoutubeWithConsentBannerAmp = (_, { service }) => (
  <Component
    isAmp
    blocks={[youtubeBlockEmbed]}
    source="https://www.youtube.com/watch?v=1e05_rwHvOM"
Severity: Major
Found in src/app/legacy/containers/SocialEmbed/index.stories.jsx and 4 other locations - About 50 mins to fix
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 52..59
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 94..101
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 130..137
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 148..155

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

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

export const TwitterAmpExample = (_, { service }) => (
  <Component
    isAmp
    blocks={[twitterBlock]}
    source="https://twitter.com/BBCNews/status/1384138850478346243?s=20"
Severity: Major
Found in src/app/legacy/containers/SocialEmbed/index.stories.jsx and 4 other locations - About 50 mins to fix
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 94..101
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 112..119
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 130..137
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 148..155

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

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

export const FacebookVideoAmpExample = (_, { service }) => (
  <Component
    isAmp
    blocks={[facebookVideoBlockEmbed]}
    source="https://www.facebook.com/RickAstley/videos/1378590239249667"
Severity: Major
Found in src/app/legacy/containers/SocialEmbed/index.stories.jsx and 4 other locations - About 50 mins to fix
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 52..59
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 94..101
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 112..119
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 130..137

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

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

export const TwitterCanonicalExample = (_, { service }) => (
  <Component
    blocks={[twitterBlock]}
    source="https://twitter.com/BBCNews/status/1384138850478346243?s=20"
    service={service}
Severity: Major
Found in src/app/legacy/containers/SocialEmbed/index.stories.jsx and 7 other locations - About 40 mins to fix
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 62..68
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 70..76
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 78..84
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 86..92
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 104..110
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 122..128
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 140..146

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

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

export const TikTokWithConsentBanner = (_, { service }) => (
  <Component
    blocks={[tiktokBlockEmbed]}
    source="https://www.tiktok.com/@cuppymusic/video/7086167423639997701"
    service={service}
Severity: Major
Found in src/app/legacy/containers/SocialEmbed/index.stories.jsx and 7 other locations - About 40 mins to fix
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 44..50
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 62..68
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 70..76
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 78..84
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 104..110
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 122..128
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 140..146

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

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

export const FacebookVideoCanonicalExample = (_, { service }) => (
  <Component
    blocks={[facebookVideoBlockEmbed]}
    source="https://www.facebook.com/RickAstley/videos/1378590239249667"
    service={service}
Severity: Major
Found in src/app/legacy/containers/SocialEmbed/index.stories.jsx and 7 other locations - About 40 mins to fix
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 44..50
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 62..68
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 70..76
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 78..84
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 86..92
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 104..110
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 122..128

Duplicated Code

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

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

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

Tuning

This issue has a mass of 48.

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

export const TwitterNoEmbed = (_, { service }) => (
  <Component
    blocks={[twitterBlockNoEmbed]}
    source="https://twitter.com/BBCNews/status/1384138850478346243?s=20"
    service={service}
Severity: Major
Found in src/app/legacy/containers/SocialEmbed/index.stories.jsx and 7 other locations - About 40 mins to fix
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 44..50
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 70..76
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 78..84
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 86..92
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 104..110
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 122..128
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 140..146

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

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

export const YoutubeWithConsentBanner = (_, { service }) => (
  <Component
    blocks={[youtubeBlockEmbed]}
    source="https://www.youtube.com/watch?v=1e05_rwHvOM"
    service={service}
Severity: Major
Found in src/app/legacy/containers/SocialEmbed/index.stories.jsx and 7 other locations - About 40 mins to fix
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 44..50
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 62..68
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 70..76
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 78..84
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 86..92
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 122..128
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 140..146

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

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

export const FacebookPostCanonicalExample = (_, { service }) => (
  <Component
    blocks={[facebookPostBlockEmbed]}
    source="https://www.facebook.com/RickAstley/posts/545713756920775"
    service={service}
Severity: Major
Found in src/app/legacy/containers/SocialEmbed/index.stories.jsx and 7 other locations - About 40 mins to fix
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 44..50
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 62..68
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 70..76
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 78..84
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 86..92
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 104..110
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 140..146

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

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

export const InstagramCanonicalExample = (_, { service }) => (
  <Component
    blocks={[instagramBlock]}
    source="https://www.instagram.com/p/CgNAEjOK46_"
    service={service}
Severity: Major
Found in src/app/legacy/containers/SocialEmbed/index.stories.jsx and 7 other locations - About 40 mins to fix
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 44..50
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 62..68
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 78..84
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 86..92
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 104..110
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 122..128
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 140..146

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

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

export const InstagramNoEmbed = (_, { service }) => (
  <Component
    blocks={[instagramBlockNoEmbed]}
    source="https://www.instagram.com/p/CgNAEjOK46_"
    service={service}
Severity: Major
Found in src/app/legacy/containers/SocialEmbed/index.stories.jsx and 7 other locations - About 40 mins to fix
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 44..50
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 62..68
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 70..76
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 86..92
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 104..110
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 122..128
src/app/legacy/containers/SocialEmbed/index.stories.jsx on lines 140..146

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

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

There are no issues that match your filters.

Category
Status