Showing 2,206 of 2,206 total issues

File bn.test.js has 342 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import moment from 'moment';
import './bn';

moment.locale('bn');

Severity: Minor
Found in src/app/legacy/psammead/psammead-locales/moment/bn.test.js - About 4 hrs to fix

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

      it('should only fire event once when scroll depth reaches 100% threshold multiple times.', () => {
        const { result } = renderHook(() => useOptimizelyScrollDepth(), {
          wrapper,
        });
    
    
    Severity: Major
    Found in src/app/hooks/useOptimizelyScrollDepth/index.test.jsx and 3 other locations - About 4 hrs to fix
    src/app/hooks/useOptimizelyScrollDepth/index.test.jsx on lines 118..130
    src/app/hooks/useOptimizelyScrollDepth/index.test.jsx on lines 145..157
    src/app/hooks/useOptimizelyScrollDepth/index.test.jsx on lines 172..184

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

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

      it('should only fire event once when scroll depth reaches 25% threshold multiple times.', () => {
        const { result } = renderHook(() => useOptimizelyScrollDepth(), {
          wrapper,
        });
    
    
    Severity: Major
    Found in src/app/hooks/useOptimizelyScrollDepth/index.test.jsx and 3 other locations - About 4 hrs to fix
    src/app/hooks/useOptimizelyScrollDepth/index.test.jsx on lines 145..157
    src/app/hooks/useOptimizelyScrollDepth/index.test.jsx on lines 172..184
    src/app/hooks/useOptimizelyScrollDepth/index.test.jsx on lines 199..211

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

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

      it('should only fire event once when scroll depth reaches 50% threshold multiple times.', () => {
        const { result } = renderHook(() => useOptimizelyScrollDepth(), {
          wrapper,
        });
    
    
    Severity: Major
    Found in src/app/hooks/useOptimizelyScrollDepth/index.test.jsx and 3 other locations - About 4 hrs to fix
    src/app/hooks/useOptimizelyScrollDepth/index.test.jsx on lines 118..130
    src/app/hooks/useOptimizelyScrollDepth/index.test.jsx on lines 172..184
    src/app/hooks/useOptimizelyScrollDepth/index.test.jsx on lines 199..211

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

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

      it('should only fire event once when scroll depth reaches 75% threshold multiple times.', () => {
        const { result } = renderHook(() => useOptimizelyScrollDepth(), {
          wrapper,
        });
    
    
    Severity: Major
    Found in src/app/hooks/useOptimizelyScrollDepth/index.test.jsx and 3 other locations - About 4 hrs to fix
    src/app/hooks/useOptimizelyScrollDepth/index.test.jsx on lines 118..130
    src/app/hooks/useOptimizelyScrollDepth/index.test.jsx on lines 145..157
    src/app/hooks/useOptimizelyScrollDepth/index.test.jsx on lines 199..211

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

    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 Headline = styled.h1`
      ${({ script }) => script && getCanon(script)};
      ${({ service }) => getSerifMedium(service)}
      color: ${({ theme }) =>
        theme.isDarkUi ? theme.palette.GREY_2 : theme.palette.GREY_10};
    Severity: Major
    Found in src/app/legacy/psammead/psammead-headings/src/index.jsx and 1 other location - About 4 hrs to fix
    src/app/legacy/psammead/psammead-headings/src/index.jsx on lines 30..40

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

    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 SubHeading = styled.h2`
      ${({ script }) => script && getTrafalgar(script)};
      ${({ service }) => getSansBold(service)}
      color: ${({ theme }) =>
        theme.isDarkUi ? theme.palette.GREY_2 : theme.palette.GREY_10};
    Severity: Major
    Found in src/app/legacy/psammead/psammead-headings/src/index.jsx and 1 other location - About 4 hrs to fix
    src/app/legacy/psammead/psammead-headings/src/index.jsx on lines 17..28

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

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

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

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

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

    Refactorings

    Further Reading

    Function t has 104 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                    function t(t) {
                        var n = e.call(this) || this;
                        return n.addXRayTraceIdHeader = function() {
                            return n.config.addXRayTraceIdHeader
                        }, n.isTracingEnabled = function() {
    Severity: Major
    Found in public/vendor/cwr.js - About 4 hrs to fix

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

        it('should construct the correct topics href given a topic id without a variant', () => {
          const topic = {
            topicName: 'foo',
            topicId: 'bar',
          };
      Severity: Major
      Found in src/app/legacy/containers/RelatedTopics/index.test.jsx and 1 other location - About 4 hrs to fix
      src/app/legacy/containers/RelatedTopics/index.test.jsx on lines 101..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 118.

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

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

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

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

      Refactorings

      Further Reading

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

        it('should construct the correct topics href given a topic id when service=cymrufyw', () => {
          const topic = {
            topicName: 'foo',
            topicId: 'bar',
          };
      Severity: Major
      Found in src/app/legacy/containers/RelatedTopics/index.test.jsx and 1 other location - About 4 hrs to fix
      src/app/legacy/containers/RelatedTopics/index.test.jsx on lines 83..99

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

      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

        2: {
          input: range(0, 2),
          expectedFirstSection: {
            firstRow: [0],
            regularRows: [],
      src/app/legacy/containers/IndexPageSection/utilities/storyRowsSplitter.test.jsx on lines 74..96

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

      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

        3: {
          input: range(0, 3),
          expectedFirstSection: {
            firstRow: [0],
            regularRows: [],
      src/app/legacy/containers/IndexPageSection/utilities/storyRowsSplitter.test.jsx on lines 51..73

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

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

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

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

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

      Refactorings

      Further Reading

      Function Cn has 103 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  Cn = function(e) {
                      function t(t) {
                          var n = e.call(this) || this;
                          return n.isTracingEnabled = function() {
                              return n.context.config.enableXRay
      Severity: Major
      Found in public/vendor/cwr.js - About 4 hrs to fix

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

          it('should append a webp file extension - all other iChef Recipes', () => {
            render(<Fixture />);
        
            const image = screen.getByAltText('Test image alt text');
            const srcSet = image.getAttribute('srcSet');
        Severity: Major
        Found in src/app/legacy/components/Promo/index.test.jsx and 3 other locations - About 4 hrs to fix
        src/app/legacy/components/Promo/index.test.jsx on lines 113..125
        src/app/legacy/components/Promo/index.test.jsx on lines 127..139
        src/app/legacy/components/Promo/index.test.jsx on lines 155..167

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

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

          it('should append a webp file extension - programmes iChef recipes', () => {
            render(<FixtureProgrammes />);
        
            const image = screen.getByAltText('Test image alt text');
            const srcSet = image.getAttribute('srcSet');
        Severity: Major
        Found in src/app/legacy/components/Promo/index.test.jsx and 3 other locations - About 4 hrs to fix
        src/app/legacy/components/Promo/index.test.jsx on lines 127..139
        src/app/legacy/components/Promo/index.test.jsx on lines 141..153
        src/app/legacy/components/Promo/index.test.jsx on lines 155..167

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

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

          it('should have only one webp file extension when URL has one already - all other iChef Recipes', () => {
            render(<FixtureWithWebp />);
        
            const image = screen.getByAltText('Test image alt text');
            const srcSet = image.getAttribute('srcSet');
        Severity: Major
        Found in src/app/legacy/components/Promo/index.test.jsx and 3 other locations - About 4 hrs to fix
        src/app/legacy/components/Promo/index.test.jsx on lines 113..125
        src/app/legacy/components/Promo/index.test.jsx on lines 127..139
        src/app/legacy/components/Promo/index.test.jsx on lines 141..153

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

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

          it('should have only one webp file extension when URL has one already - programmes iChef recipes', () => {
            render(<FixtureProgrammesWithWebp />);
        
            const image = screen.getByAltText('Test image alt text');
            const srcSet = image.getAttribute('srcSet');
        Severity: Major
        Found in src/app/legacy/components/Promo/index.test.jsx and 3 other locations - About 4 hrs to fix
        src/app/legacy/components/Promo/index.test.jsx on lines 113..125
        src/app/legacy/components/Promo/index.test.jsx on lines 141..153
        src/app/legacy/components/Promo/index.test.jsx on lines 155..167

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

        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('Image Caption', () => {
            const imageCaptionEl = document.querySelector('main figure figcaption');
        
            it('should be in the document', () => {
              expect(imageCaptionEl).toBeInTheDocument();
        Severity: Major
        Found in src/integration/common/image.js and 1 other location - About 4 hrs to fix
        src/integration/common/storyPromo.js on lines 19..32

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

        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', () => {
              const h3El = storyPromo.querySelector('h3');
              it('should be in the promo', () => {
                expect(h3El).toBeInTheDocument();
              });
        Severity: Major
        Found in src/integration/common/storyPromo.js and 1 other location - About 4 hrs to fix
        src/integration/common/image.js on lines 18..32

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

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

        import {
          videoBlock,
          rawVideoBlock,
          blockContainingText,
          blockBase,
        Severity: Minor
        Found in src/app/models/blocks/index.test.js - About 4 hrs to fix
          Severity
          Category
          Status
          Source
          Language