bufferapp/ui

View on GitHub

Showing 333 of 333 total issues

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

export const ButtonWrapperBase = css`
  -webkit-appearance: none;
  align-items: center;
  background-color: ${white};
  border: 0;
Severity: Major
Found in src/components/Button/style.ts and 1 other location - About 1 hr to fix
src/components/Button/style.ts on lines 102..138

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

export const ButtonBase = css`
  -webkit-appearance: none;
  align-items: center;
  background-color: ${white};
  border: 0;
Severity: Major
Found in src/components/Button/style.ts and 1 other location - About 1 hr to fix
src/components/Button/style.ts on lines 30..69

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

          <ButtonOverlapContainer>
            {/* @ts-expect-error TS(2740) FIXME: Type '{ type: string; icon: Element; hasIconOnly: ... Remove this comment to see the full error message */}
            <Button
              type="secondary"
              icon={<ArrowRight />}
Severity: Major
Found in src/components/Carousel/Carousel.tsx and 1 other location - About 1 hr to fix
src/components/Carousel/Carousel.tsx on lines 209..220

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

export default function ExampleTooltip() {
  return (
    <Tooltip label="My Tooltip Label 🙌" position="top">
      <Button type="primary" onClick={() => {}} label="Click Me" fullWidth />
    </Tooltip>
Severity: Major
Found in src/documentation/examples/Tooltip/position/top.tsx and 2 other locations - About 1 hr to fix
src/documentation/examples/Tooltip/position/left.tsx on lines 8..14
src/documentation/examples/Tooltip/position/right.tsx on lines 8..14

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

export default function ExampleTooltip() {
  return (
    <Tooltip label="My Tooltip Label 🙌" position="right">
      <Button type="primary" onClick={() => {}} label="Click Me" fullWidth />
    </Tooltip>
Severity: Major
Found in src/documentation/examples/Tooltip/position/right.tsx and 2 other locations - About 1 hr to fix
src/documentation/examples/Tooltip/position/left.tsx on lines 8..14
src/documentation/examples/Tooltip/position/top.tsx on lines 8..14

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

export default function ExampleTooltip() {
  return (
    <Tooltip label="My Tooltip Label 🙌" position="left">
      <Button type="primary" onClick={() => {}} label="Click Me" fullWidth />
    </Tooltip>
Severity: Major
Found in src/documentation/examples/Tooltip/position/left.tsx and 2 other locations - About 1 hr to fix
src/documentation/examples/Tooltip/position/right.tsx on lines 8..14
src/documentation/examples/Tooltip/position/top.tsx on lines 8..14

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

Function FormModalTest has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function FormModalTest() {
  const [modalOpen, openModal] = useState(false)
  return (
    <div
      style={{
Severity: Minor
Found in src/documentation/examples/Modal/form-modal.tsx - About 1 hr to fix

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

      setFocusToNextItem = () => {
        // @ts-expect-error TS(2339) FIXME: Property 'focusedItem' does not exist on type 'Rea... Remove this comment to see the full error message
        const { focusedItem } = this.state
    
        const newIndex = this.isLastItem(focusedItem)
    Severity: Major
    Found in src/components/DropdownMenu/PopupMenu/PopupMenu.tsx and 1 other location - About 1 hr to fix
    src/components/DropdownMenu/PopupMenu/PopupMenu.tsx on lines 88..98

    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

      setFocusToPreviousItem = () => {
        // @ts-expect-error TS(2339) FIXME: Property 'focusedItem' does not exist on type 'Rea... Remove this comment to see the full error message
        const { focusedItem } = this.state
    
        const newIndex = this.isFirstItem(focusedItem)
    Severity: Major
    Found in src/components/DropdownMenu/PopupMenu/PopupMenu.tsx and 1 other location - About 1 hr to fix
    src/components/DropdownMenu/PopupMenu/PopupMenu.tsx on lines 76..86

    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 wrapper = shallow(
          <Select
            // @ts-expect-error TS(2769) FIXME: No overload matches this call.
            onSelectClick={() => true}
            items={[
    Severity: Major
    Found in src/components/Select/Select.test.tsx and 1 other location - About 1 hr to fix
    src/components/Select/Select.test.tsx on lines 182..198

    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 wrapper = shallow(
          <Select
            // @ts-expect-error TS(2769) FIXME: No overload matches this call.
            onSelectClick={() => true}
            items={[
    Severity: Major
    Found in src/components/Select/Select.test.tsx and 1 other location - About 1 hr to fix
    src/components/Select/Select.test.tsx on lines 210..226

    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 ModalTest has 41 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: Minor
    Found in src/documentation/examples/Modal/basic-modal.tsx - About 1 hr to fix

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

      async function main() {
        console.log(
          `⚡️ Let's create a new component ${username}! (Press Ctrl+C to cancel)\n`,
        )
      
      
      Severity: Minor
      Found in scripts/newComponent.js - About 1 hr to fix

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

          render() {
            // @ts-expect-error TS(7031) FIXME: Binding element 'children' implicitly has an 'any'... Remove this comment to see the full error message
            const DocHeading = ({ children, ...props }) => <Heading {...props} />
            // @ts-expect-error TS(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message
            const { page, component, links } = this.props
        Severity: Minor
        Found in src/documentation/app/layout/content/Markdown.tsx - About 1 hr to fix

          Function ModalTest has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

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

              [
                'tiktok',
                // @ts-expect-error TS(7031) FIXME: Binding element 'size' implicitly has an 'any' typ... Remove this comment to see the full error message
                ({ size }) => (
                  <Styles.SocialIconWrapper size={size} bgColor={tiktok}>
            Severity: Major
            Found in src/components/Avatar/Avatar.tsx and 9 other locations - About 1 hr to fix
            src/components/Avatar/Avatar.tsx on lines 47..55
            src/components/Avatar/Avatar.tsx on lines 56..64
            src/components/Avatar/Avatar.tsx on lines 65..73
            src/components/Avatar/Avatar.tsx on lines 74..82
            src/components/Avatar/Avatar.tsx on lines 83..91
            src/components/Avatar/Avatar.tsx on lines 92..100
            src/components/Avatar/Avatar.tsx on lines 101..109
            src/components/Avatar/Avatar.tsx on lines 130..138
            src/components/Avatar/Avatar.tsx on lines 139..147

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

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

              [
                'twitter',
                // @ts-expect-error TS(7031) FIXME: Binding element 'size' implicitly has an 'any' typ... Remove this comment to see the full error message
                ({ size }) => (
                  <Styles.SocialIconWrapper size={size} bgColor={twitter}>
            Severity: Major
            Found in src/components/Avatar/Avatar.tsx and 9 other locations - About 1 hr to fix
            src/components/Avatar/Avatar.tsx on lines 47..55
            src/components/Avatar/Avatar.tsx on lines 56..64
            src/components/Avatar/Avatar.tsx on lines 74..82
            src/components/Avatar/Avatar.tsx on lines 83..91
            src/components/Avatar/Avatar.tsx on lines 92..100
            src/components/Avatar/Avatar.tsx on lines 101..109
            src/components/Avatar/Avatar.tsx on lines 110..118
            src/components/Avatar/Avatar.tsx on lines 130..138
            src/components/Avatar/Avatar.tsx on lines 139..147

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

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

              [
                'pinterest',
                // @ts-expect-error TS(7031) FIXME: Binding element 'size' implicitly has an 'any' typ... Remove this comment to see the full error message
                ({ size }) => (
                  <Styles.SocialIconWrapper size={size} bgColor={pinterest}>
            Severity: Major
            Found in src/components/Avatar/Avatar.tsx and 9 other locations - About 1 hr to fix
            src/components/Avatar/Avatar.tsx on lines 47..55
            src/components/Avatar/Avatar.tsx on lines 56..64
            src/components/Avatar/Avatar.tsx on lines 65..73
            src/components/Avatar/Avatar.tsx on lines 74..82
            src/components/Avatar/Avatar.tsx on lines 92..100
            src/components/Avatar/Avatar.tsx on lines 101..109
            src/components/Avatar/Avatar.tsx on lines 110..118
            src/components/Avatar/Avatar.tsx on lines 130..138
            src/components/Avatar/Avatar.tsx on lines 139..147

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

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

              [
                'mastodon',
                // @ts-expect-error TS(7031) FIXME: Binding element 'size' implicitly has an 'any' typ... Remove this comment to see the full error message
                ({ size }) => (
                  <Styles.SocialIconWrapper size={size} bgColor={mastodon}>
            Severity: Major
            Found in src/components/Avatar/Avatar.tsx and 9 other locations - About 1 hr to fix
            src/components/Avatar/Avatar.tsx on lines 47..55
            src/components/Avatar/Avatar.tsx on lines 56..64
            src/components/Avatar/Avatar.tsx on lines 65..73
            src/components/Avatar/Avatar.tsx on lines 74..82
            src/components/Avatar/Avatar.tsx on lines 83..91
            src/components/Avatar/Avatar.tsx on lines 92..100
            src/components/Avatar/Avatar.tsx on lines 101..109
            src/components/Avatar/Avatar.tsx on lines 110..118
            src/components/Avatar/Avatar.tsx on lines 139..147

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

            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

              folder: PropTypes.shape({
                code: PropTypes.string.isRequired,
                description: PropTypes.string.isRequired,
                title: PropTypes.string.isRequired,
                name: PropTypes.string.isRequired,
            Severity: Major
            Found in src/documentation/app/layout/content/Component.tsx and 1 other location - About 1 hr to fix
            src/documentation/app/layout/content/Component.tsx on lines 158..163

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

            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