TwitchSeventeen/react-blazeui

View on GitHub

Showing 78 of 78 total issues

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

function Accordion(props) {
  const {
    children, className, as: Component, dataName, ...other
  } = props;
  const classes = classNames('c-card--accordion', className);
Severity: Major
Found in src/lib/components/Accordion/index.jsx and 9 other locations - About 2 hrs to fix
src/lib/components/Accordion/Content/index.jsx on lines 6..20
src/lib/components/Address/index.jsx on lines 5..19
src/lib/components/Card/Body/index.jsx on lines 5..19
src/lib/components/Card/Header/index.jsx on lines 5..19
src/lib/components/Highlight/index.jsx on lines 5..19
src/lib/components/Key/index.jsx on lines 5..19
src/lib/components/Loud/index.jsx on lines 5..19
src/lib/components/Mono/index.jsx on lines 5..19
src/lib/components/Quiet/index.jsx on lines 5..19

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

function Header(props) {
  const {
    children, className, as: Component, dataName, ...other
  } = props;

Severity: Major
Found in src/lib/components/Table/Header/index.jsx and 4 other locations - About 2 hrs to fix
src/lib/components/Table/Body/index.jsx on lines 5..24
src/lib/components/Table/Caption/index.jsx on lines 5..24
src/lib/components/Table/Cell/index.jsx on lines 5..24
src/lib/components/Table/HeaderCell/index.jsx on lines 5..24

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

function Highlight(props) {
  const {
    children, className, dataName, as: Component, ...other
  } = props;
  const classes = classNames('u-text--highlight', className);
Severity: Major
Found in src/lib/components/Highlight/index.jsx and 9 other locations - About 2 hrs to fix
src/lib/components/Accordion/Content/index.jsx on lines 6..20
src/lib/components/Accordion/index.jsx on lines 8..22
src/lib/components/Address/index.jsx on lines 5..19
src/lib/components/Card/Body/index.jsx on lines 5..19
src/lib/components/Card/Header/index.jsx on lines 5..19
src/lib/components/Key/index.jsx on lines 5..19
src/lib/components/Loud/index.jsx on lines 5..19
src/lib/components/Mono/index.jsx on lines 5..19
src/lib/components/Quiet/index.jsx on lines 5..19

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

function Body(props) {
  const {
    children, className, dataName, as: Component, ...other
  } = props;
  const classes = classNames('c-card__body', className);
Severity: Major
Found in src/lib/components/Card/Body/index.jsx and 9 other locations - About 2 hrs to fix
src/lib/components/Accordion/Content/index.jsx on lines 6..20
src/lib/components/Accordion/index.jsx on lines 8..22
src/lib/components/Address/index.jsx on lines 5..19
src/lib/components/Card/Header/index.jsx on lines 5..19
src/lib/components/Highlight/index.jsx on lines 5..19
src/lib/components/Key/index.jsx on lines 5..19
src/lib/components/Loud/index.jsx on lines 5..19
src/lib/components/Mono/index.jsx on lines 5..19
src/lib/components/Quiet/index.jsx on lines 5..19

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

function Address(props) {
  const {
    children, className, as: Component, dataName, ...other
  } = props;
  const classes = classNames('c-address', className);
Severity: Major
Found in src/lib/components/Address/index.jsx and 9 other locations - About 2 hrs to fix
src/lib/components/Accordion/Content/index.jsx on lines 6..20
src/lib/components/Accordion/index.jsx on lines 8..22
src/lib/components/Card/Body/index.jsx on lines 5..19
src/lib/components/Card/Header/index.jsx on lines 5..19
src/lib/components/Highlight/index.jsx on lines 5..19
src/lib/components/Key/index.jsx on lines 5..19
src/lib/components/Loud/index.jsx on lines 5..19
src/lib/components/Mono/index.jsx on lines 5..19
src/lib/components/Quiet/index.jsx on lines 5..19

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

function HeaderCell(props) {
  const {
    children, className, as: Component, dataName, ...other
  } = props;

Severity: Major
Found in src/lib/components/Table/HeaderCell/index.jsx and 4 other locations - About 2 hrs to fix
src/lib/components/Table/Body/index.jsx on lines 5..24
src/lib/components/Table/Caption/index.jsx on lines 5..24
src/lib/components/Table/Cell/index.jsx on lines 5..24
src/lib/components/Table/Header/index.jsx on lines 5..24

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

function Key(props) {
  const {
    children, className, dataName, as: Component, ...other
  } = props;
  const classes = classNames('u-kbd', className);
Severity: Major
Found in src/lib/components/Key/index.jsx and 9 other locations - About 2 hrs to fix
src/lib/components/Accordion/Content/index.jsx on lines 6..20
src/lib/components/Accordion/index.jsx on lines 8..22
src/lib/components/Address/index.jsx on lines 5..19
src/lib/components/Card/Body/index.jsx on lines 5..19
src/lib/components/Card/Header/index.jsx on lines 5..19
src/lib/components/Highlight/index.jsx on lines 5..19
src/lib/components/Loud/index.jsx on lines 5..19
src/lib/components/Mono/index.jsx on lines 5..19
src/lib/components/Quiet/index.jsx on lines 5..19

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

function Body(props) {
  const {
    children, className, dataName, as: Component, ...other
  } = props;

Severity: Major
Found in src/lib/components/Table/Body/index.jsx and 4 other locations - About 2 hrs to fix
src/lib/components/Table/Caption/index.jsx on lines 5..24
src/lib/components/Table/Cell/index.jsx on lines 5..24
src/lib/components/Table/Header/index.jsx on lines 5..24
src/lib/components/Table/HeaderCell/index.jsx on lines 5..24

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

Function Image has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

function Image(props) {
  const {
    className, src, alt, user, filter, as: Component, likes, height, width, dataName, ...other
  } = props;
  const classes = classNames(
Severity: Minor
Found in src/lib/components/Image/index.jsx - About 2 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

Textarea.propTypes = {
  /**
   * This element can have children
   */
  children: PropTypes.node,
Severity: Major
Found in src/lib/components/Input/Textarea/index.jsx and 4 other locations - About 2 hrs to fix
src/lib/components/Input/Label/index.jsx on lines 28..54
src/lib/components/Input/Checkbox/index.jsx on lines 36..62
src/lib/components/Input/Select/index.jsx on lines 27..53
src/lib/components/Timeline/index.jsx on lines 28..54

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

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

Label.propTypes = {
  /**
   * This element can have children
   */
  children: PropTypes.node,
Severity: Major
Found in src/lib/components/Input/Label/index.jsx and 4 other locations - About 2 hrs to fix
src/lib/components/Input/Checkbox/index.jsx on lines 36..62
src/lib/components/Input/Select/index.jsx on lines 27..53
src/lib/components/Input/Textarea/index.jsx on lines 27..53
src/lib/components/Timeline/index.jsx on lines 28..54

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

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

Timeline.propTypes = {
  /**
   * This element can have children
   */
  children: PropTypes.node,
Severity: Major
Found in src/lib/components/Timeline/index.jsx and 4 other locations - About 2 hrs to fix
src/lib/components/Input/Label/index.jsx on lines 28..54
src/lib/components/Input/Checkbox/index.jsx on lines 36..62
src/lib/components/Input/Select/index.jsx on lines 27..53
src/lib/components/Input/Textarea/index.jsx on lines 27..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 78.

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

Select.propTypes = {
  /**
   * This element can have children
   */
  children: PropTypes.node,
Severity: Major
Found in src/lib/components/Input/Select/index.jsx and 4 other locations - About 2 hrs to fix
src/lib/components/Input/Label/index.jsx on lines 28..54
src/lib/components/Input/Checkbox/index.jsx on lines 36..62
src/lib/components/Input/Textarea/index.jsx on lines 27..53
src/lib/components/Timeline/index.jsx on lines 28..54

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

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

Checkbox.propTypes = {
  /**
   * Additional classes
   */
  className: PropTypes.string,
Severity: Major
Found in src/lib/components/Input/Checkbox/index.jsx and 4 other locations - About 2 hrs to fix
src/lib/components/Input/Label/index.jsx on lines 28..54
src/lib/components/Input/Select/index.jsx on lines 27..53
src/lib/components/Input/Textarea/index.jsx on lines 27..53
src/lib/components/Timeline/index.jsx on lines 28..54

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

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

  render() {
    const { activeItem } = this.state;
    return (
      <Container>
        <Breadcrumbs>
Severity: Minor
Found in src/demo/pages/Home.jsx - About 1 hr to fix

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

    function Cell(props) {
      const {
        align,
        children,
        className,
    Severity: Minor
    Found in src/lib/components/Grid/Cell/index.jsx - About 1 hr to fix

      Function Grid has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function Grid(props) {
        const {
          align,
          children,
          className,
      Severity: Minor
      Found in src/lib/components/Grid/index.jsx - About 1 hr to fix

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

        Blockquote.propTypes = {
          /**
           * This element can have children
           */
          children: PropTypes.node,
        Severity: Major
        Found in src/lib/components/Blockquote/index.jsx and 5 other locations - About 1 hr to fix
        src/lib/components/Breadcrumbs/Item/index.jsx on lines 22..44
        src/lib/components/Card/Footer/index.jsx on lines 21..43
        src/lib/components/Card/index.jsx on lines 26..48
        src/lib/components/Code/index.jsx on lines 21..43
        src/lib/components/List/Item/index.jsx on lines 26..48

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

        Item.propTypes = {
          /**
           * This element can have children
           */
          children: PropTypes.node,
        Severity: Major
        Found in src/lib/components/Breadcrumbs/Item/index.jsx and 5 other locations - About 1 hr to fix
        src/lib/components/Blockquote/index.jsx on lines 25..47
        src/lib/components/Card/Footer/index.jsx on lines 21..43
        src/lib/components/Card/index.jsx on lines 26..48
        src/lib/components/Code/index.jsx on lines 21..43
        src/lib/components/List/Item/index.jsx on lines 26..48

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

        Card.propTypes = {
          /**
           * This element can have children
           */
          children: PropTypes.node,
        Severity: Major
        Found in src/lib/components/Card/index.jsx and 5 other locations - About 1 hr to fix
        src/lib/components/Blockquote/index.jsx on lines 25..47
        src/lib/components/Breadcrumbs/Item/index.jsx on lines 22..44
        src/lib/components/Card/Footer/index.jsx on lines 21..43
        src/lib/components/Code/index.jsx on lines 21..43
        src/lib/components/List/Item/index.jsx on lines 26..48

        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