bbc/psammead

View on GitHub

Showing 201 of 201 total issues

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

  shouldMatchSnapshot(
    'should render portrait image correctly',
    <Component
      alt={portrait.alt}
      attribution={portrait.attribution}
packages/components/psammead-image/src/testHelpers/snapshotTests.jsx on lines 6..17
packages/components/psammead-image/src/testHelpers/snapshotTests.jsx on lines 30..41
packages/components/psammead-image/src/testHelpers/snapshotTests.jsx on lines 42..53

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

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

  shouldMatchSnapshot(
    'should render square image correctly',
    <Component
      alt={square.alt}
      attribution={square.attribution}
packages/components/psammead-image/src/testHelpers/snapshotTests.jsx on lines 6..17
packages/components/psammead-image/src/testHelpers/snapshotTests.jsx on lines 18..29
packages/components/psammead-image/src/testHelpers/snapshotTests.jsx on lines 42..53

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

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

  shouldMatchSnapshot(
    'should render landscape image correctly',
    <Component
      alt={landscape.alt}
      attribution={landscape.attribution}
packages/components/psammead-image/src/testHelpers/snapshotTests.jsx on lines 18..29
packages/components/psammead-image/src/testHelpers/snapshotTests.jsx on lines 30..41
packages/components/psammead-image/src/testHelpers/snapshotTests.jsx on lines 42..53

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

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

import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs, text, boolean, select } from '@storybook/addon-knobs';
import Image from '@bbc/psammead-image';
import MediaIndicator from '@bbc/psammead-media-indicator';
Severity: Minor
Found in packages/components/psammead-story-promo/src/index.stories.jsx - About 2 hrs to fix

    File index.test.jsx has 266 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable no-console */
    import React from 'react';
    import { shouldMatchSnapshot } from '@bbc/psammead-test-helpers';
    import { render } from '@testing-library/react';
    import { latin, arabic } from '@bbc/gel-foundations/scripts';
    Severity: Minor
    Found in packages/components/psammead-section-label/src/index.test.jsx - About 2 hrs to fix

      File index.jsx has 258 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import React from 'react';
      import styled from '@emotion/styled';
      import {
        GEL_GROUP_3_SCREEN_WIDTH_MIN,
        GEL_GROUP_3_SCREEN_WIDTH_MAX,
      Severity: Minor
      Found in packages/components/psammead-bulletin/src/index.jsx - About 2 hrs to fix

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

          relativeTime: {
            future: 'inside %s',
            past: '%s wey don pass',
            s: 'just some seconds',
            ss: '%d seconds',
        Severity: Major
        Found in packages/utilities/psammead-locales/moment/pcm.js and 1 other location - About 2 hrs to fix
        packages/utilities/psammead-locales/moment/ig.js on lines 28..43

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

        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

          relativeTime: {
            future: 'na %s',
            past: '%s gara aga',
            s: 'ntabịanya ole na ole',
            ss: 'ntabịanya %d',
        Severity: Major
        Found in packages/utilities/psammead-locales/moment/ig.js and 1 other location - About 2 hrs to fix
        packages/utilities/psammead-locales/moment/pcm.js on lines 31..46

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

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

        const Brand = forwardRef((props, ref) => {
          const {
            svgHeight,
            maxWidth,
            minWidth,
        Severity: Minor
        Found in packages/components/psammead-brand/src/index.jsx - About 1 hr to fix

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

          const redactIssue = async (reqBody, regex) => {
            const issue = await fetchIssue(reqBody);
          
            const scannedIssue = await scanIssue(issue, regex);
          
          
          Severity: Major
          Found in packages/utilities/exposure-scanning/src/index.js and 1 other location - About 1 hr to fix
          packages/utilities/exposure-scanning/src/index.js on lines 6..15

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

          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 redactPr = async (reqBody, regex) => {
            const pr = await fetchPr(reqBody);
          
            const scannedPr = await scanPr(pr, regex);
          
          
          Severity: Major
          Found in packages/utilities/exposure-scanning/src/index.js and 1 other location - About 1 hr to fix
          packages/utilities/exposure-scanning/src/index.js on lines 17..26

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

          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 TextGridFallBackLeadingStory = dir => `
            width: ${fullWidthColumnsMaxScaleable};
            @media (min-width: ${GEL_GROUP_3_SCREEN_WIDTH_MIN}) {
              ${
                dir === 'rtl'
          Severity: Major
          Found in packages/components/psammead-story-promo/src/TextStyles.jsx and 1 other location - About 1 hr to fix
          packages/components/psammead-story-promo/src/ImageStyles.jsx on lines 76..91

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

          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

          moment.defineLocale('so', {
            months: 'Jannaayo_Febraayo_Maarso_Abriil_Maajo_Juunyo_Luulyo_Agoosto_Sebtembar_Oktoobar_Nofembar_Disembar'.split(
              '_'
            ),
            longDateFormat: { LL: 'D MMMM YYYY' },
          Severity: Major
          Found in packages/utilities/psammead-locales/moment/so.js and 4 other locations - About 1 hr to fix
          packages/utilities/psammead-locales/moment/am.js on lines 3..13
          packages/utilities/psammead-locales/moment/ha.js on lines 3..15
          packages/utilities/psammead-locales/moment/rw.js on lines 3..15
          packages/utilities/psammead-locales/moment/ti.js on lines 3..13

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

          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

          moment.defineLocale('rw', {
            months: "Ukwa mbere_Ukwa kabiri_Ukwa gatatu_Ukwa kane_Ukwa gatanu_Ukwa gatandatu_Ukw'indwi_Ukw'umunani_Ukw'icenda_Ukw'icumi_Ukw'icumi na rimwe_Ukw'icumi na kabiri".split(
              '_'
            ),
            longDateFormat: { LL: 'D MMMM YYYY' },
          Severity: Major
          Found in packages/utilities/psammead-locales/moment/rw.js and 4 other locations - About 1 hr to fix
          packages/utilities/psammead-locales/moment/am.js on lines 3..13
          packages/utilities/psammead-locales/moment/ha.js on lines 3..15
          packages/utilities/psammead-locales/moment/so.js on lines 3..15
          packages/utilities/psammead-locales/moment/ti.js on lines 3..13

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

          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

          moment.defineLocale('ha', {
            months: 'Janairu_Fabrairu_Maris_Aprilu_Mayu_Yuni_Yuli_Agusta_Satumba_Oktoba_Nuwamba_Disamba'.split(
              '_'
            ),
            longDateFormat: { LL: 'D MMMM YYYY' },
          Severity: Major
          Found in packages/utilities/psammead-locales/moment/ha.js and 4 other locations - About 1 hr to fix
          packages/utilities/psammead-locales/moment/am.js on lines 3..13
          packages/utilities/psammead-locales/moment/rw.js on lines 3..15
          packages/utilities/psammead-locales/moment/so.js on lines 3..15
          packages/utilities/psammead-locales/moment/ti.js on lines 3..13

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

          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

          moment.defineLocale('am', {
            months: 'ጥር_የካቲት_መጋቢት_ሚያዚያ_ግንቦት_ሰኔ_ሀምሌ_ነሐሴ_መስከረም_ጥቅምት_ህዳር_ታህሳስ'.split('_'),
            longDateFormat: { LL: 'D MMMM YYYY' },
            relativeTime: {
              past: '%s በፊት',
          Severity: Major
          Found in packages/utilities/psammead-locales/moment/am.js and 4 other locations - About 1 hr to fix
          packages/utilities/psammead-locales/moment/ha.js on lines 3..15
          packages/utilities/psammead-locales/moment/rw.js on lines 3..15
          packages/utilities/psammead-locales/moment/so.js on lines 3..15
          packages/utilities/psammead-locales/moment/ti.js on lines 3..13

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

          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 ImageGridFallbackLeadingStory = dir => `
            width: ${fullWidthColumnsMaxScaleable};
          
            @media (min-width: ${GEL_GROUP_3_SCREEN_WIDTH_MIN}) {
              ${
          packages/components/psammead-story-promo/src/TextStyles.jsx on lines 93..106

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

          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

          moment.defineLocale('ti', {
            months: 'ጥሪ_ለካቲት_መጋቢት_ሚያዝያ_ጉንቦት_ሰነ_ሓምለ_ነሓሰ_መስከረም_ጥቅምቲ_ሕዳር_ታሕሳስ'.split('_'),
            longDateFormat: { LL: 'D MMMM YYYY' },
            relativeTime: {
              past: 'ቅድሚ %s',
          Severity: Major
          Found in packages/utilities/psammead-locales/moment/ti.js and 4 other locations - About 1 hr to fix
          packages/utilities/psammead-locales/moment/am.js on lines 3..13
          packages/utilities/psammead-locales/moment/ha.js on lines 3..15
          packages/utilities/psammead-locales/moment/rw.js on lines 3..15
          packages/utilities/psammead-locales/moment/so.js on lines 3..15

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

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

          const childrenFallback = (
            item,
            dir,
            columnsGroup,
            marginsGroup,
          Severity: Minor
          Found in packages/components/psammead-grid/src/index.jsx - About 1 hr to fix

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

              zhongwenTrad: {
                service: 'zhongwen',
                variant: 'trad',
                text: '鄭文傑:中國警方公布「嫖娼證據」 引發中港網友論戰',
                longText:
            packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 403..417
            packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 418..432
            packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 553..567
            packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 568..582
            packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 651..665

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

            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