bufferapp/ui

View on GitHub

Showing 333 of 333 total issues

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

const BandcampIcon = createIconComponent({
  content: (
    <g>
      <g clipPath="url(#clip0_2376_1716)">
        <path
Severity: Major
Found in src/components/Icon/Icons/Bandcamp.tsx and 6 other locations - About 4 hrs to fix
src/components/Icon/Icons/Dribbble.tsx on lines 8..25
src/components/Icon/Icons/Help.tsx on lines 8..25
src/components/Icon/Icons/Mastodon.tsx on lines 8..25
src/components/Icon/Icons/Pause.tsx on lines 8..25
src/components/Icon/Icons/Pinterest.tsx on lines 8..25
src/components/Icon/Icons/StarOutline.tsx on lines 8..25

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

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

  render() {
    const {
      // @ts-expect-error TS(2339) FIXME: Property 'products' does not exist on type 'Readon... Remove this comment to see the full error message
      products,
      // @ts-expect-error TS(2339) FIXME: Property 'activeProduct' does not exist on type 'R... Remove this comment to see the full error message
Severity: Major
Found in src/components/NavBar/NavBar.tsx - About 3 hrs to fix

    Select has 29 functions (exceeds 20 allowed). Consider refactoring.
    Open

    export default class Select extends React.Component {
      // @ts-expect-error TS(7006) FIXME: Parameter 'itemsA' implicitly has an 'any' type.
      static sameItems = (itemsA, itemsB) =>
        itemsA.length === itemsB.length &&
        itemsA.every(
    Severity: Minor
    Found in src/components/Select/Select.tsx - About 3 hrs to fix

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

      const ShortIcon = createIconComponent({
        content: (
          <g>
            <g clipPath="url(#clip0_3870_2347)">
              <path d="M10.784 6.011c-.22-.123-.43-.256-.68-.4.25-.151.479-.284.699-.408a2.732 2.732 0 001.415-2.815C11.97.515 9.798-.569 8.154.363c-1.683.96-3.367 1.902-5.03 2.89-1.32.79-1.512 1.836-1.301 3.072.134.77.65 1.34 1.33 1.73.238.134.468.267.726.42-.287.17-.545.323-.823.465a2.737 2.737 0 00-.956 3.623 2.787 2.787 0 003.758 1.132 392.887 392.887 0 004.352-2.492c.344-.2.708-.38 1.014-.627 1.54-1.274 1.31-3.585-.44-4.565zm-5.136 3.12V4.974l3.615 2.073L5.648 9.13z" />
      Severity: Major
      Found in src/components/Icon/Icons/Short.tsx and 4 other locations - About 3 hrs to fix
      src/components/Icon/Icons/Hide.tsx on lines 8..21
      src/components/Icon/Icons/Shopify.tsx on lines 8..21
      src/components/Icon/Icons/Sparkles.tsx on lines 8..21
      src/components/Icon/Icons/Story.tsx on lines 8..21

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

      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

      const ShopifyIcon = createIconComponent({
        content: (
          <g>
            <g clipPath="url(#clip0_835_6)">
              <path d="M12.761.371l-1.02 3.597s-1.153-.5-2.522-.4c-2.013.125-2.013 1.3-2.013 1.599.108 1.599 4.643 1.948 4.911 5.72.188 2.973-1.69 4.996-4.4 5.146-3.275.2-5.073-1.599-5.073-1.599l.698-2.748S5.14 12.96 6.589 12.86c.94-.05 1.288-.774 1.261-1.274-.134-2.098-3.837-1.973-4.079-5.42C3.583 3.27 5.623.321 10.131.071c1.745-.125 2.63.3 2.63.3z" />
      Severity: Major
      Found in src/components/Icon/Icons/Shopify.tsx and 4 other locations - About 3 hrs to fix
      src/components/Icon/Icons/Hide.tsx on lines 8..21
      src/components/Icon/Icons/Short.tsx on lines 8..21
      src/components/Icon/Icons/Sparkles.tsx on lines 8..21
      src/components/Icon/Icons/Story.tsx on lines 8..21

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

      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

      const HideIcon = createIconComponent({
        content: (
          <g>
            <g clipPath="url(#clip0_389_219)">
              <path d="M16 8s-.506.777-1.372 1.746c-.709-.468-1.706-1.012-3.014-1.727l-.632-.345a3 3 0 00-4.221-2.407c-.318-.195-.624-.385-.918-.568-.692-.43-1.32-.821-1.89-1.137C5.14 2.67 6.523 2 8 2c4.418 0 8 6 8 6zm-8 5.5c1.26 0 2.45-.447 3.51-1.086-.82-.382-1.763-.89-2.84-1.49a3.001 3.001 0 01-3.526-2.003C3.312 7.858 1.98 7.082 1.097 6.44.4 7.33 0 8 0 8s3.582 5.5 8 5.5zM.67 5.12a1 1 0 01.99-1.738l13.789 7.862a1 1 0 11-.99 1.737L.67 5.12z" />
      Severity: Major
      Found in src/components/Icon/Icons/Hide.tsx and 4 other locations - About 3 hrs to fix
      src/components/Icon/Icons/Shopify.tsx on lines 8..21
      src/components/Icon/Icons/Short.tsx on lines 8..21
      src/components/Icon/Icons/Sparkles.tsx on lines 8..21
      src/components/Icon/Icons/Story.tsx on lines 8..21

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

      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

      const StoryIcon = createIconComponent({
        content: (
          <g>
            <g clipPath="url(#clip0_3870_2374)">
              <path d="M13.568 4.056c.302.736.667 1.555.85 2.285.166.648.234 1.317.202 1.985a6.614 6.614 0 01-.392 1.953 6.493 6.493 0 01-.944 1.723c-.4.517-.875.97-1.412 1.343a7.14 7.14 0 01-1.27.715 6.788 6.788 0 01-1.485.464 6.467 6.467 0 01-1.523.107l-.158-.01-.36 1.338.247.02c.65.049 1.304.018 1.946-.093a8.23 8.23 0 002.654-.957 9.48 9.48 0 00.733-.463 7.761 7.761 0 002.87-3.726c.55-1.52.626-3.172.22-4.737-.26-.751-.544-1.744-1.083-2.503-.356-.502-1.4-.204-1.09.556h-.005zm-6.262 1.77a.694.694 0 01.696-.726.698.698 0 01.696.726v1.479h1.478a.698.698 0 01.697.695.695.695 0 01-.697.696h-1.48v1.479a.694.694 0 01-.695.725.697.697 0 01-.696-.725v-1.48H5.82A.697.697 0 015.125 8a.695.695 0 01.696-.695h1.485v-1.48zM3.164 14.37c.462.359.964.665 1.495.912l.22.102.36-1.334-.15-.072a6.436 6.436 0 01-2.04-1.59l-.11-.13-1.197.689.154.186c.375.457.8.871 1.268 1.235v.002zM.074 9.054c.084.585.234 1.16.448 1.71l.085.225 1.196-.69-.057-.16a6.412 6.412 0 01-.362-2.568l.01-.168-1.34-.352-.023.24a7.644 7.644 0 00.043 1.763zm1.02-5.017c-.12.202-.229.405-.328.612L.66 4.87l1.337.358.076-.15a6.108 6.108 0 01.513-.841 8.02 8.02 0 011.067-1.213l.121-.11-.692-1.2-.188.163c-.265.23-.515.475-.75.735a9.45 9.45 0 00-.671.835c-.137.193-.261.39-.381.586l.001.004zM6.58.102a7.091 7.091 0 00-1.327.357l-.227.084.691 1.196.16-.056a5.802 5.802 0 014.022.083.685.685 0 00.937-.65.68.68 0 00-.443-.622A7.093 7.093 0 006.581.102z" />
      Severity: Major
      Found in src/components/Icon/Icons/Story.tsx and 4 other locations - About 3 hrs to fix
      src/components/Icon/Icons/Hide.tsx on lines 8..21
      src/components/Icon/Icons/Shopify.tsx on lines 8..21
      src/components/Icon/Icons/Short.tsx on lines 8..21
      src/components/Icon/Icons/Sparkles.tsx on lines 8..21

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

      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

      const SparklesIcon = createIconComponent({
        content: (
          <g>
            <g clipPath="url(#clip0_2722_1828)">
              <path d="M6.589 6.993l-1.13 3.896-1.13-3.896L.514 5.84 4.33 4.685 5.459.79l1.13 3.895 3.814 1.154L6.59 6.993zm5.682 2.597l2.826-1.587-1.554 2.886 1.554 2.885-2.826-1.587-2.825 1.587L11 10.889 9.446 8.003l2.825 1.587zm-5.033 1.582l-1.2 2.164 1.2 2.164-2.119-1.226L3 15.5l1.2-2.164L3 11.172l2.119 1.226 2.119-1.226z" />
      Severity: Major
      Found in src/components/Icon/Icons/Sparkles.tsx and 4 other locations - About 3 hrs to fix
      src/components/Icon/Icons/Hide.tsx on lines 8..21
      src/components/Icon/Icons/Shopify.tsx on lines 8..21
      src/components/Icon/Icons/Short.tsx on lines 8..21
      src/components/Icon/Icons/Story.tsx on lines 8..21

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

      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 AnalyzeLogo = () => (
        <svg
          width="19"
          height="20"
          viewBox="0 0 17 18"
      Severity: Major
      Found in src/components/NavBar/NavBarProducts/NavBarProducts.tsx and 1 other location - About 3 hrs to fix
      src/components/NavBar/NavBarProducts/NavBarProducts.tsx on lines 69..90

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

      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 PublishLogo = () => (
        <svg
          width="17"
          height="16"
          viewBox="0 0 17 16"
      Severity: Major
      Found in src/components/NavBar/NavBarProducts/NavBarProducts.tsx and 1 other location - About 3 hrs to fix
      src/components/NavBar/NavBarProducts/NavBarProducts.tsx on lines 92..113

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

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

      /* eslint-disable no-console */
      
      require('dotenv').config()
      
      const fs = require('fs')
      Severity: Minor
      Found in scripts/generateIconComponents.js - About 3 hrs to fix

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

                  {
                    test: /\.(js|mjs)$/,
                    exclude: /@babel(?:\/|\\{1,2})runtime/,
                    loader: require.resolve('babel-loader'),
                    options: {
        Severity: Major
        Found in scripts/config/webpack.config.dev.js and 1 other location - About 3 hrs to fix
        scripts/config/webpack.config.prod.js on lines 320..344

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

        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

                  {
                    test: /\.(js|mjs)$/,
                    exclude: /@babel(?:\/|\\{1,2})runtime/,
                    loader: require.resolve('babel-loader'),
                    options: {
        Severity: Major
        Found in scripts/config/webpack.config.prod.js and 1 other location - About 3 hrs to fix
        scripts/config/webpack.config.dev.js on lines 245..269

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

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

        export default function ModalTest() {
          const [modalOpen, openModal] = useState(false)
          return (
            <div style={{ width: '100%', height: '400px', position: 'relative' }}>
              <Button
        Severity: Major
        Found in src/documentation/examples/Modal/with-carousel.tsx - About 2 hrs to fix

          File style.ts has 284 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* eslint-disable no-confusing-arrow */
          import style, { css } from 'styled-components'
          import {
            grayDarker,
            blue,
          Severity: Minor
          Found in src/components/Button/style.ts - About 2 hrs to fix

            Function main has 68 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            async function main() {
              let spinner
              try {
                spinner = ora(`Loading BDS Icons Figma file: ${figmaIconFileUrl}`).start()
                const figmaFile = await getFigmaFile(figmaIconFileId)
            Severity: Major
            Found in scripts/generateIconComponents.js - About 2 hrs to fix

              Function render has 67 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                render() {
                  const { left, currentSlideIndex } = this.state
                  // @ts-expect-error TS(2339) FIXME: Property 'width' does not exist on type 'Readonly<... Remove this comment to see the full error message
                  const { children, width, rightNavigation, withIndicators } = this.props
              
              
              Severity: Major
              Found in src/components/Carousel/Carousel.tsx - About 2 hrs to fix

                Function ExampleSimpleModal has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export default function ExampleSimpleModal() {
                  const [modalOpen, openModal] = useState(false)
                  const [changed, setChanged] = useState(false)
                  const [showingModal, setShowingModal] = useState(false)
                
                
                Severity: Major
                Found in src/documentation/examples/SimpleModal/SimpleModal.tsx - About 2 hrs to fix

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

                          if (
                            item[searchField].toLowerCase().includes(searchValue.toLowerCase())
                          ) {
                            return {
                              ...filtered,
                  Severity: Major
                  Found in src/components/Select/Select.tsx and 1 other location - About 2 hrs to fix
                  src/components/Select/Select.tsx on lines 433..448

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 87.

                  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

                          if (
                            item[searchField].toLowerCase().startsWith(searchValue.toLowerCase())
                          ) {
                            return {
                              ...filtered,
                  Severity: Major
                  Found in src/components/Select/Select.tsx and 1 other location - About 2 hrs to fix
                  src/components/Select/Select.tsx on lines 449..464

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

                  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